Spaces:
Sleeping
Sleeping
Pedro Henrique Conrado
commited on
Commit
·
7962c9a
1
Parent(s):
9a41c33
commit
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ TARGET_VIDEO_PATH = "test.mp4"
|
|
33 |
CLASS_ID = [0,1,2,3]
|
34 |
|
35 |
file_urls = [
|
36 |
-
'https://
|
37 |
]
|
38 |
|
39 |
def download_file(url, save_name):
|
@@ -43,7 +43,7 @@ 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], 'video.mp4')
|
47 |
|
48 |
video_examples = [['video.mp4']]
|
49 |
|
@@ -142,4 +142,4 @@ def ObjectDetection(video_path):
|
|
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()
|
|
|
33 |
CLASS_ID = [0,1,2,3]
|
34 |
|
35 |
file_urls = [
|
36 |
+
'https://drive.google.com/file/d/1dE7sViBayWAvi0YBHPhw0AX7AKhBTGY6/view?usp=sharing'
|
37 |
]
|
38 |
|
39 |
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_examples = [['video.mp4']]
|
49 |
|
|
|
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.queue().launch()
|