jcho02 commited on
Commit
e2369f4
·
verified ·
1 Parent(s): aadf4d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -99,13 +99,13 @@ demo = gr.Blocks()
99
  with demo:
100
  mic_transcribe = gr.Interface(
101
  fn=gradio_mic_interface,
102
- inputs=gr.Audio(source="microphone", type="numpy"), # changed here
103
  outputs=gr.Textbox(label="Prediction")
104
  )
105
 
106
  file_transcribe = gr.Interface(
107
  fn=gradio_file_interface,
108
- inputs=gr.Audio(source="upload", type="numpy"), # and here
109
  outputs=gr.Textbox(label="Prediction")
110
  )
111
 
@@ -114,4 +114,3 @@ with demo:
114
 
115
  # Launch the demo with debugging enabled to catch any potential errors early on
116
  demo.launch(debug=True)
117
-
 
99
  with demo:
100
  mic_transcribe = gr.Interface(
101
  fn=gradio_mic_interface,
102
+ inputs=gr.Audio(), # No type needed for microphone input
103
  outputs=gr.Textbox(label="Prediction")
104
  )
105
 
106
  file_transcribe = gr.Interface(
107
  fn=gradio_file_interface,
108
+ inputs=gr.Audio(type="filepath"), # Specify filepath for file upload
109
  outputs=gr.Textbox(label="Prediction")
110
  )
111
 
 
114
 
115
  # Launch the demo with debugging enabled to catch any potential errors early on
116
  demo.launch(debug=True)