develops20 commited on
Commit
b4eb3f6
·
verified ·
1 Parent(s): 6c44527

removed type param from gr.Audio component

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -35,9 +35,10 @@ def process_audio(audio):
35
  # Gradio interface
36
  with gr.Blocks() as demo:
37
  gr.Markdown("# AI Support Agent: Car Dealership")
38
- audio_input = gr.Audio(type="microphone", label="Speak to the Agent")
39
  text_output = gr.Textbox(label="Agent Response")
40
  audio_output = gr.Audio(label="Listen to Response")
41
- gr.Interface(fn=process_audio, inputs=audio_input, outputs=[text_output, audio_output]).launch()
 
42
 
43
  demo.launch()
 
35
  # Gradio interface
36
  with gr.Blocks() as demo:
37
  gr.Markdown("# AI Support Agent: Car Dealership")
38
+ audio_input = gr.Audio(label="Speak to the Agent") # Removed 'type' parameter
39
  text_output = gr.Textbox(label="Agent Response")
40
  audio_output = gr.Audio(label="Listen to Response")
41
+ btn = gr.Button("Submit")
42
+ btn.click(fn=process_audio, inputs=audio_input, outputs=[text_output, audio_output])
43
 
44
  demo.launch()