Spaces:
Sleeping
Sleeping
Pedro Henrique Conrado
commited on
Commit
·
9a41c33
1
Parent(s):
7af1dde
commit
Browse files
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],
|
47 |
|
48 |
-
|
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=
|
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()
|