Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,11 +12,10 @@ def detect_objects(image):
|
|
12 |
results = model(image)
|
13 |
return results[0].plot()
|
14 |
|
15 |
-
|
16 |
fn=detect_objects,
|
17 |
-
inputs=gr.Image(sources="webcam", type="numpy", label="
|
18 |
outputs=gr.Image(type="numpy", label="Detection Output"),
|
19 |
-
|
20 |
-
)
|
21 |
|
22 |
-
interface.launch()
|
|
|
12 |
results = model(image)
|
13 |
return results[0].plot()
|
14 |
|
15 |
+
gr.Interface(
|
16 |
fn=detect_objects,
|
17 |
+
inputs=gr.Image(sources="webcam", type="numpy", label="Live Webcam"),
|
18 |
outputs=gr.Image(type="numpy", label="Detection Output"),
|
19 |
+
live=True
|
20 |
+
).launch()
|
21 |
|
|