xingzhehe commited on
Commit
f226284
1 Parent(s): 50f26f8

cache examples

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -55,7 +55,7 @@ with gr.Blocks() as blocks:
55
  run_btn.click(fn=predict_image, inputs=[image_in], outputs=[image_out])
56
  gr.Examples(fn=predict_image, examples=[["assets/jackie_chan.jpg", None]],
57
  inputs=[image_in], outputs=[image_out],
58
- cache_examples=False)
59
 
60
  with gr.Tab("Video") as tab:
61
  with gr.Row():
@@ -67,7 +67,7 @@ with gr.Blocks() as blocks:
67
  run_btn.click(fn=predict_video, inputs=[video_in], outputs=[video_out])
68
  gr.Examples(fn=predict_video, examples=[["assets/00344.mp4"],],
69
  inputs=[video_in], outputs=[video_out],
70
- cache_examples=False)
71
 
72
  blocks.launch()
73
 
 
55
  run_btn.click(fn=predict_image, inputs=[image_in], outputs=[image_out])
56
  gr.Examples(fn=predict_image, examples=[["assets/jackie_chan.jpg", None]],
57
  inputs=[image_in], outputs=[image_out],
58
+ cache_examples=True)
59
 
60
  with gr.Tab("Video") as tab:
61
  with gr.Row():
 
67
  run_btn.click(fn=predict_video, inputs=[video_in], outputs=[video_out])
68
  gr.Examples(fn=predict_video, examples=[["assets/00344.mp4"],],
69
  inputs=[video_in], outputs=[video_out],
70
+ cache_examples=True)
71
 
72
  blocks.launch()
73