Update app.py
Browse files
app.py
CHANGED
@@ -31,11 +31,11 @@ with gr.Blocks() as demo:
|
|
31 |
model_dropdown.change(fn=llm_intro, inputs=model_dropdown, outputs=explanation)
|
32 |
|
33 |
with gr.Column(scale=4):
|
34 |
-
chatbot = gr.Chatbot(label="Chatroom", value=[(None, "How may I help you today?")])
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
39 |
|
40 |
# Launch the Gradio app
|
41 |
demo.launch()
|
|
|
31 |
model_dropdown.change(fn=llm_intro, inputs=model_dropdown, outputs=explanation)
|
32 |
|
33 |
with gr.Column(scale=4):
|
34 |
+
chatbot = gr.Chatbot(label="Chatroom", value=[(None, "How may I help you today?")], elem_id="chatbot")
|
35 |
|
36 |
+
message = gr.Textbox(label="Message")
|
37 |
|
38 |
+
message.submit(generate_response, inputs=[model_dropdown, message, chatbot], outputs=[message, chatbot])
|
39 |
|
40 |
# Launch the Gradio app
|
41 |
demo.launch()
|