Spaces:
Runtime error
Runtime error
Commit
·
52274d3
1
Parent(s):
88bf482
Update app.py
Browse files
app.py
CHANGED
@@ -285,7 +285,8 @@ def detect(img, model):
|
|
285 |
#print(f"Results saved to {save_dir}{s}")
|
286 |
|
287 |
print(f'Done. ({time.time() - t0:.3f}s)')
|
|
|
288 |
|
289 |
|
290 |
-
|
291 |
-
gr.Interface(detect,[gr.Image(type="pil"),gr.Dropdown(choices=model_names)], gr.Image(type="pil"),title="Yolov7",examples=[["horses.jpeg", "yolov7"]],description="demo for <a href='https://github.com/WongKinYiu/yolov7' style='text-decoration: underline' target='_blank'>WongKinYiu/yolov7</a> Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors").launch()
|
|
|
285 |
#print(f"Results saved to {save_dir}{s}")
|
286 |
|
287 |
print(f'Done. ({time.time() - t0:.3f}s)')
|
288 |
+
return vid_writer
|
289 |
|
290 |
|
291 |
+
gr.Interface(detect,inputs = [gr.Video(format="mp4")], outputs = gr.Video(format="mp4"), title="Yolov7",description="demo for <a href='https://github.com/WongKinYiu/yolov7' style='text-decoration: underline' target='_blank'>WongKinYiu/yolov7</a> Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors").launch()
|
292 |
+
# gr.Interface(detect,[gr.Image(type="pil"),gr.Dropdown(choices=model_names)], gr.Image(type="pil"),title="Yolov7",examples=[["horses.jpeg", "yolov7"]],description="demo for <a href='https://github.com/WongKinYiu/yolov7' style='text-decoration: underline' target='_blank'>WongKinYiu/yolov7</a> Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors").launch()
|