Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -83,15 +83,15 @@ class ChatbotInterface:
|
|
83 |
)
|
84 |
|
85 |
user_input.submit(fn=conversation, inputs=[user_input, chatbot_output], outputs=chatbot_output)
|
86 |
-
#
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
|
91 |
-
#
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
|
96 |
logging.info("Gradio interface created successfully.")
|
97 |
return demo
|
|
|
83 |
)
|
84 |
|
85 |
user_input.submit(fn=conversation, inputs=[user_input, chatbot_output], outputs=chatbot_output)
|
86 |
+
# Buttons
|
87 |
+
with gr.Row():
|
88 |
+
reset = gr.Button(self.reset_button, variant="secondary")
|
89 |
+
submit = gr.Button(self.submit_button, variant="primary")
|
90 |
|
91 |
+
# Button actions
|
92 |
+
submit.click(fn=conversation, inputs=[user_input, chatbot_output], outputs=chatbot_output)
|
93 |
+
user_input.submit(fn=conversation, inputs=[user_input, chatbot_output], outputs=chatbot_output)
|
94 |
+
reset.click(fn=self.reset_output, inputs=None, outputs=chatbot_output)
|
95 |
|
96 |
logging.info("Gradio interface created successfully.")
|
97 |
return demo
|