Pedro Henrique Conrado commited on
Commit
9a41c33
·
1 Parent(s): 7af1dde
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,9 +43,9 @@ def download_file(url, save_name):
43
  open(save_name, 'wb').write(file.content)
44
 
45
  for i, url in enumerate(file_urls):
46
- download_file(file_urls[i], f"video.mp4")
47
 
48
- video_path = 'video.mp4'
49
 
50
  model = YOLO(MODEL)
51
  model.fuse()
@@ -141,5 +141,5 @@ def ObjectDetection(video_path):
141
 
142
  return TARGET_VIDEO_PATH
143
 
144
- demo = gr.Interface(fn=ObjectDetection, inputs=gr.Video(), outputs=gr.Video(), examples=video_path, cache_examples=False)
145
  demo.launch()
 
43
  open(save_name, 'wb').write(file.content)
44
 
45
  for i, url in enumerate(file_urls):
46
+ download_file(file_urls[i], 'video.mp4')
47
 
48
+ video_examples = [['video.mp4']]
49
 
50
  model = YOLO(MODEL)
51
  model.fuse()
 
141
 
142
  return TARGET_VIDEO_PATH
143
 
144
+ demo = gr.Interface(fn=ObjectDetection, inputs=gr.Video(), outputs=gr.Video(), examples=video_examples, cache_examples=False)
145
  demo.launch()