Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def detect_objects(frame, confidence_threshold=0.5):
|
|
51 |
# Added a slider for the confidence threshold
|
52 |
iface = gr.Interface(fn=detect_objects,
|
53 |
inputs=[
|
54 |
-
gr.Video(
|
55 |
gr.Slider(minimum=0.0, maximum=1.0, default=0.5, label="Confidence Threshold") # Confidence slider
|
56 |
],
|
57 |
outputs="image") # Show output image with bounding boxes
|
|
|
51 |
# Added a slider for the confidence threshold
|
52 |
iface = gr.Interface(fn=detect_objects,
|
53 |
inputs=[
|
54 |
+
gr.Video(sources="webcam", type="numpy"), # Webcam input
|
55 |
gr.Slider(minimum=0.0, maximum=1.0, default=0.5, label="Confidence Threshold") # Confidence slider
|
56 |
],
|
57 |
outputs="image") # Show output image with bounding boxes
|