Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import os
|
|
2 |
import gradio as gr
|
3 |
from ultralytics import YOLO
|
4 |
import cv2
|
5 |
-
from datetime import datetime
|
6 |
|
7 |
# Load YOLOv8 model
|
8 |
model = YOLO("yolov8n.pt")
|
@@ -26,8 +25,8 @@ with gr.Blocks() as demo:
|
|
26 |
gr.Markdown("# Real-Time Object Detection for Blind Assistance")
|
27 |
gr.Markdown("This app detects objects in real-time using your webcam.")
|
28 |
|
29 |
-
#
|
30 |
-
video_input = gr.Video(
|
31 |
output_gallery = gr.Video(label="Detection Output")
|
32 |
|
33 |
detect_button = gr.Button("Start Detection")
|
|
|
2 |
import gradio as gr
|
3 |
from ultralytics import YOLO
|
4 |
import cv2
|
|
|
5 |
|
6 |
# Load YOLOv8 model
|
7 |
model = YOLO("yolov8n.pt")
|
|
|
25 |
gr.Markdown("# Real-Time Object Detection for Blind Assistance")
|
26 |
gr.Markdown("This app detects objects in real-time using your webcam.")
|
27 |
|
28 |
+
# Remove the `source` argument
|
29 |
+
video_input = gr.Video(label="Webcam Stream", type="filepath")
|
30 |
output_gallery = gr.Video(label="Detection Output")
|
31 |
|
32 |
detect_button = gr.Button("Start Detection")
|