Update app.py
Browse files
app.py
CHANGED
|
@@ -63,18 +63,6 @@ def main_orchestrator(audio_input, text_input, history):
|
|
| 63 |
history.append([text_input, response])
|
| 64 |
return history, audio_res
|
| 65 |
|
| 66 |
-
with gr.Blocks() as demo:
|
| 67 |
-
state = gr.State([])
|
| 68 |
-
with gr.Row():
|
| 69 |
-
with gr.Column():
|
| 70 |
-
audio_in = gr.Audio(label="Voice", type="filepath")
|
| 71 |
-
text_in = gr.Textbox(label="Message")
|
| 72 |
-
btn = gr.Button("Send")
|
| 73 |
-
with gr.Column():
|
| 74 |
-
# REMOVED type="messages" to stop the crash
|
| 75 |
-
chatbot_ui = gr.Chatbot(label="Therapy History")
|
| 76 |
-
audio_out = gr.Audio(autoplay=True)
|
| 77 |
|
| 78 |
-
btn.click(main_orchestrator, [audio_in, text_in, state], [chatbot_ui, audio_out])
|
| 79 |
|
| 80 |
demo.launch()
|
|
|
|
| 63 |
history.append([text_input, response])
|
| 64 |
return history, audio_res
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
|
|
|
| 67 |
|
| 68 |
demo.launch()
|