Spaces:
Runtime error
Runtime error
Commit
•
bd4424b
1
Parent(s):
2165cdc
specifying the webcam source explicitly by passing the webcam ID as an argument to the gr.Interface function.
Browse files
app.py
CHANGED
@@ -241,10 +241,11 @@ with mp_holistic.Holistic(min_detection_confidence=0.5, min_tracking_confidence=
|
|
241 |
|
242 |
# Define the Gradio interface
|
243 |
iface = gr.Interface(
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
248 |
|
249 |
# Launch the interface
|
250 |
iface.launch()
|
|
|
241 |
|
242 |
# Define the Gradio interface
|
243 |
iface = gr.Interface(
|
244 |
+
fn=predict_with_webcam,
|
245 |
+
inputs=gr.inputs.Image(shape=(None, None, 3), source="webcam", tool="opencv"),
|
246 |
+
outputs=gr.outputs.Textbox()
|
247 |
+
)
|
248 |
+
|
249 |
|
250 |
# Launch the interface
|
251 |
iface.launch()
|