Luongdzung commited on
Commit
752eb4b
1 Parent(s): e868380

cache the examples

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -394,10 +394,12 @@ def detect_vid(vid,model):
394
  img_interface = gr.Interface(detect_img,
395
  [gr.Image(type="pil"),gr.Dropdown(choices=models_list)],
396
  gr.Image(type="pil"),title="Yolov7",examples=[["cars.jpg", "yolov7.pt"]],
 
397
  description="Yolov7 for image")
398
  vid_interface = gr.Interface(detect_vid,
399
  [gr.Video(),gr.Dropdown(choices=models_list)],
400
  gr.Video(format='mp4'),title="Yolov7",examples=[["messi.mp4", "yolov7.pt"]],
 
401
  description="Yolov7 for video")
402
  final_interface = gr.TabbedInterface([img_interface, vid_interface],
403
  tab_names=['Image Inference', 'Video Inference'])
 
394
  img_interface = gr.Interface(detect_img,
395
  [gr.Image(type="pil"),gr.Dropdown(choices=models_list)],
396
  gr.Image(type="pil"),title="Yolov7",examples=[["cars.jpg", "yolov7.pt"]],
397
+ cache_examples=False,
398
  description="Yolov7 for image")
399
  vid_interface = gr.Interface(detect_vid,
400
  [gr.Video(),gr.Dropdown(choices=models_list)],
401
  gr.Video(format='mp4'),title="Yolov7",examples=[["messi.mp4", "yolov7.pt"]],
402
+ cache_examples=False,
403
  description="Yolov7 for video")
404
  final_interface = gr.TabbedInterface([img_interface, vid_interface],
405
  tab_names=['Image Inference', 'Video Inference'])