aje6 commited on
Commit
5ffc0a0
·
verified ·
1 Parent(s): 08cceac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -51,7 +51,8 @@ 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(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
 
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