khang119966 commited on
Commit
ed236e2
·
verified ·
1 Parent(s): 662b42f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
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
- examples=[["demo_2.jpg", "List all the text.", 80]])
 
 
 
 
 
 
 
 
 
 
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()