KingNish commited on
Commit
b861d0a
·
verified ·
1 Parent(s): 0444d7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -227,11 +227,12 @@ with gr.Blocks(
227
  )
228
 
229
  # Voice chat block
230
- with gr.Blocks() as voice:
231
- gr.Interface(fn=respond,
232
- inputs=[gr.Audio(label="User Input", sources="microphone", type="filepath"), gr.Checkbox(label="Web Search", value=False)],
233
- outputs=[gr.Audio(label="AI", autoplay=True)],
234
- live=True)
 
235
 
236
  # Live chat block
237
  with gr.Blocks() as livechat:
 
227
  )
228
 
229
  # Voice chat block
230
+ with gr.Blocks() as voice:
231
+ with gr.Row():
232
+ web_search = gr.Checkbox(label="Web Search", value=False)
233
+ input = gr.Audio(label="User Input", sources="microphone", type="filepath")
234
+ output = gr.Audio(label="AI", autoplay=True)
235
+ gr.Interface(fn=respond, inputs=[input, web_search], outputs=[output], live=True)
236
 
237
  # Live chat block
238
  with gr.Blocks() as livechat: