hysts HF staff commited on
Commit
972158c
1 Parent(s): 9c6f5af

Cache examples

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -150,7 +150,7 @@ with demo:
150
  with gr.Column():
151
  label_video = gr.Label(num_top_classes=5)
152
  with gr.Row():
153
- gr.Examples(examples=['./videos/hitting_baseball.mp4', './videos/hoverboarding.mp4', './videos/yoga.mp4'], inputs=input_video)
154
 
155
  with gr.Tab("Image"):
156
  # with gr.Box():
@@ -163,7 +163,7 @@ with demo:
163
  with gr.Column():
164
  label_image = gr.Label(num_top_classes=5)
165
  with gr.Row():
166
- gr.Examples(examples=['./images/cat.png', './images/dog.png', './images/panda.png'], inputs=input_image)
167
 
168
  gr.Markdown(
169
  """
 
150
  with gr.Column():
151
  label_video = gr.Label(num_top_classes=5)
152
  with gr.Row():
153
+ gr.Examples(examples=['./videos/hitting_baseball.mp4', './videos/hoverboarding.mp4', './videos/yoga.mp4'], inputs=input_video, outputs=label_video, fn=inference_video, cache_examples=True)
154
 
155
  with gr.Tab("Image"):
156
  # with gr.Box():
 
163
  with gr.Column():
164
  label_image = gr.Label(num_top_classes=5)
165
  with gr.Row():
166
+ gr.Examples(examples=['./images/cat.png', './images/dog.png', './images/panda.png'], inputs=input_image, outputs=label_image, fn=inference_image, cache_examples=True)
167
 
168
  gr.Markdown(
169
  """