Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -239,10 +239,10 @@ with gr.Blocks(css="footer {display: none}") as demo:
|
|
| 239 |
|
| 240 |
with gr.Row():
|
| 241 |
audio_input = gr.Audio(
|
| 242 |
-
source="microphone",
|
| 243 |
-
type="filepath",
|
| 244 |
label="Speak here",
|
| 245 |
-
show_label=True
|
|
|
|
|
|
|
| 246 |
)
|
| 247 |
audio_output = gr.Audio(
|
| 248 |
label="Sam's Voice",
|
|
@@ -251,7 +251,7 @@ with gr.Blocks(css="footer {display: none}") as demo:
|
|
| 251 |
)
|
| 252 |
|
| 253 |
# Handle audio input
|
| 254 |
-
audio_input.
|
| 255 |
fn=chat,
|
| 256 |
inputs=[audio_input, chatbot],
|
| 257 |
outputs=[chatbot, audio_output],
|
|
@@ -268,6 +268,4 @@ with gr.Blocks(css="footer {display: none}") as demo:
|
|
| 268 |
# Launch the interface
|
| 269 |
if __name__ == "__main__":
|
| 270 |
demo.launch(
|
| 271 |
-
server_name="0.0.0.0",
|
| 272 |
-
server_port=7860
|
| 273 |
)
|
|
|
|
| 239 |
|
| 240 |
with gr.Row():
|
| 241 |
audio_input = gr.Audio(
|
|
|
|
|
|
|
| 242 |
label="Speak here",
|
| 243 |
+
show_label=True,
|
| 244 |
+
type="filepath",
|
| 245 |
+
format="wav"
|
| 246 |
)
|
| 247 |
audio_output = gr.Audio(
|
| 248 |
label="Sam's Voice",
|
|
|
|
| 251 |
)
|
| 252 |
|
| 253 |
# Handle audio input
|
| 254 |
+
audio_input.change(
|
| 255 |
fn=chat,
|
| 256 |
inputs=[audio_input, chatbot],
|
| 257 |
outputs=[chatbot, audio_output],
|
|
|
|
| 268 |
# Launch the interface
|
| 269 |
if __name__ == "__main__":
|
| 270 |
demo.launch(
|
|
|
|
|
|
|
| 271 |
)
|