Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,10 +52,10 @@ def run_app(webcam):
|
|
| 52 |
|
| 53 |
return cv2.cvtColor(frame, cv2.COLOR_BGR2RGB), black_hole_figure, (wave_data, sr)
|
| 54 |
|
| 55 |
-
# Launch Gradio UI
|
| 56 |
iface = gr.Interface(
|
| 57 |
fn=run_app,
|
| 58 |
-
inputs=gr.Image(
|
| 59 |
outputs=["image", "plot", "audio"],
|
| 60 |
live=True
|
| 61 |
)
|
|
|
|
| 52 |
|
| 53 |
return cv2.cvtColor(frame, cv2.COLOR_BGR2RGB), black_hole_figure, (wave_data, sr)
|
| 54 |
|
| 55 |
+
# Launch Gradio UI (Fixed Input for New Gradio Versions)
|
| 56 |
iface = gr.Interface(
|
| 57 |
fn=run_app,
|
| 58 |
+
inputs=gr.Image(tool="webcam", streaming=True), # FIXED
|
| 59 |
outputs=["image", "plot", "audio"],
|
| 60 |
live=True
|
| 61 |
)
|