Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -541,8 +541,18 @@ with gr.Blocks() as demo:
|
|
541 |
btn = gr.Button("Inference")
|
542 |
video = gr.Video(label="Visualization Video")
|
543 |
|
544 |
-
btn.click(fn=generate_video, inputs=[image, prompt, max_tokens], outputs=video
|
545 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
546 |
|
547 |
if __name__ == "__main__":
|
548 |
demo.launch()
|
|
|
541 |
btn = gr.Button("Inference")
|
542 |
video = gr.Video(label="Visualization Video")
|
543 |
|
544 |
+
btn.click(fn=generate_video, inputs=[image, prompt, max_tokens], outputs=video)
|
545 |
+
|
546 |
+
# Add examples
|
547 |
+
gr.Examples(
|
548 |
+
examples=[
|
549 |
+
["demo_2.jpg", "List all the text.", 80],
|
550 |
+
],
|
551 |
+
inputs=[image, prompt, max_tokens],
|
552 |
+
outputs=video,
|
553 |
+
fn=generate_video,
|
554 |
+
cache_examples=True
|
555 |
+
)
|
556 |
|
557 |
if __name__ == "__main__":
|
558 |
demo.launch()
|