Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,11 +50,11 @@ def detect_objects(frame, confidence_threshold=0.5):
|
|
50 |
# Gradio interface to use the webcam for real-time object detection
|
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.Image(sources=["webcam"], type="numpy"),
|
56 |
-
gr.Slider(minimum=0.0, maximum=1.0, default=0.5, label="Confidence Threshold") # Confidence slider
|
57 |
-
],
|
58 |
outputs="image") # Show output image with bounding boxes
|
59 |
|
60 |
iface.launch()
|
|
|
50 |
# Gradio interface to use the webcam for real-time object detection
|
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 |
+
input = gr.Image(sources=["webcam"], type="numpy"),
|
56 |
+
# gr.Slider(minimum=0.0, maximum=1.0, default=0.5, label="Confidence Threshold") # Confidence slider
|
57 |
+
# ],
|
58 |
outputs="image") # Show output image with bounding boxes
|
59 |
|
60 |
iface.launch()
|