Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ with gr.Blocks() as demo:
|
|
| 28 |
with gr.Column(scale=4):
|
| 29 |
chatbot = gr.Chatbot()
|
| 30 |
msg = gr.Textbox()
|
| 31 |
-
audio_input = gr.Audio(autoplay=True)
|
| 32 |
save_button = gr.Button("Save Chat")
|
| 33 |
clear = gr.ClearButton([msg, chatbot])
|
| 34 |
|
|
@@ -56,12 +56,11 @@ with gr.Blocks() as demo:
|
|
| 56 |
else:
|
| 57 |
return "Chat not found!", []
|
| 58 |
|
| 59 |
-
|
| 60 |
-
return "input.wav"
|
| 61 |
|
| 62 |
msg.submit(respond, [msg, chatbot], [msg, chatbot,audio_input])
|
| 63 |
save_button.click(save_chat, [chatbot], outputs=[display_chat_names,chatbot]) # Added display_chat_names as an output
|
| 64 |
load_button.click(load_chat, [enter_chat_name], outputs=[msg,chatbot])
|
| 65 |
|
| 66 |
-
|
| 67 |
demo.launch()
|
|
|
|
| 28 |
with gr.Column(scale=4):
|
| 29 |
chatbot = gr.Chatbot()
|
| 30 |
msg = gr.Textbox()
|
| 31 |
+
audio_input = gr.Audio(autoplay=True,value="input.wav")
|
| 32 |
save_button = gr.Button("Save Chat")
|
| 33 |
clear = gr.ClearButton([msg, chatbot])
|
| 34 |
|
|
|
|
| 56 |
else:
|
| 57 |
return "Chat not found!", []
|
| 58 |
|
| 59 |
+
|
|
|
|
| 60 |
|
| 61 |
msg.submit(respond, [msg, chatbot], [msg, chatbot,audio_input])
|
| 62 |
save_button.click(save_chat, [chatbot], outputs=[display_chat_names,chatbot]) # Added display_chat_names as an output
|
| 63 |
load_button.click(load_chat, [enter_chat_name], outputs=[msg,chatbot])
|
| 64 |
|
| 65 |
+
|
| 66 |
demo.launch()
|