taechasith commited on
Commit
f84c3c4
·
verified ·
1 Parent(s): 0ea55c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -50,12 +50,12 @@ def run_app(webcam):
50
  black_hole_figure = black_hole_visualization(rotation)
51
  wave_data, sr = generate_wave(frequency=200 + rotation)
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.Video(source="webcam", streaming=True), # ✅ Corrected Input
59
  outputs=["image", "plot", "audio"],
60
  live=True
61
  )
 
50
  black_hole_figure = black_hole_visualization(rotation)
51
  wave_data, sr = generate_wave(frequency=200 + rotation)
52
 
53
+ return frame, 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(type="numpy", label="Webcam Feed"), # ✅ Fixed Input
59
  outputs=["image", "plot", "audio"],
60
  live=True
61
  )