KingNish commited on
Commit
2606bca
1 Parent(s): 43de266

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -120,15 +120,15 @@ async def generate1(prompt):
120
  with gr.Blocks(css="style.css") as demo:
121
  gr.Markdown(DESCRIPTION)
122
  with gr.Row():
123
- user_input = gr.Audio(label="Voice Chat (BETA)", type="filepath")
124
- output_audio = gr.Audio(label="JARVIS", type="filepath",
125
  interactive=False,
126
  autoplay=True,
127
  elem_classes="audio")
128
- with gr.Row():
129
- translate_btn = gr.Button("Response")
130
- translate_btn.click(fn=respond, inputs=user_input,
131
- outputs=output_audio, api_name=False)
132
  gr.Markdown(FAST)
133
  with gr.Row():
134
  user_input = gr.Textbox(label="Prompt", value="What is Wikipedia")
 
120
  with gr.Blocks(css="style.css") as demo:
121
  gr.Markdown(DESCRIPTION)
122
  with gr.Row():
123
+ input = gr.Audio(label="Voice Chat (BETA)", sources="microphone", type="filepath", waveform_options=False)
124
+ output = gr.Audio(label="JARVIS", type="filepath",
125
  interactive=False,
126
  autoplay=True,
127
  elem_classes="audio")
128
+ gr.Interface(
129
+ fn=respond,
130
+ inputs=[input],
131
+ outputs=[output], live=True)
132
  gr.Markdown(FAST)
133
  with gr.Row():
134
  user_input = gr.Textbox(label="Prompt", value="What is Wikipedia")