Update app.py
Browse files
app.py
CHANGED
@@ -84,8 +84,10 @@ with gr.Blocks() as demo:
|
|
84 |
avatar_images=(os.path.join(os.getcwd(), 'user.png'), os.path.join(os.getcwd(), 'ai.png')))
|
85 |
chat_input = gr.MultimodalTextbox(interactive=True, placeholder="Enter message or upload file...", show_label=False)
|
86 |
|
87 |
-
|
88 |
-
|
|
|
|
|
89 |
|
90 |
# Launch the Gradio interface
|
91 |
demo.launch(share=True) # Enable public sharing
|
|
|
84 |
avatar_images=(os.path.join(os.getcwd(), 'user.png'), os.path.join(os.getcwd(), 'ai.png')))
|
85 |
chat_input = gr.MultimodalTextbox(interactive=True, placeholder="Enter message or upload file...", show_label=False)
|
86 |
|
87 |
+
hat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input])
|
88 |
+
bot_msg = chat_msg.then(bot, chatbot, chatbot, api_name="bot_response")
|
89 |
+
bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
|
90 |
+
|
91 |
|
92 |
# Launch the Gradio interface
|
93 |
demo.launch(share=True) # Enable public sharing
|