Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,15 +65,14 @@ def chatbot_response(query):
|
|
| 65 |
except Exception as e:
|
| 66 |
return f"An error occurred: {str(e)}"
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
)
|
| 76 |
|
| 77 |
-
|
| 78 |
|
| 79 |
|
|
|
|
| 65 |
except Exception as e:
|
| 66 |
return f"An error occurred: {str(e)}"
|
| 67 |
|
| 68 |
+
with gr.Blocks() as demo:
|
| 69 |
+
chatbot = gr.Chatbot()
|
| 70 |
+
with gr.Row():
|
| 71 |
+
msg = gr.Textbox(show_label=False, placeholder="Enter your question...")
|
| 72 |
+
submit = gr.Button("Send")
|
| 73 |
+
submit.click(chatbot_response, [msg, chatbot], [chatbot, chatbot])
|
| 74 |
+
msg.submit(chatbot_response, [msg, chatbot], [chatbot, chatbot])
|
|
|
|
| 75 |
|
| 76 |
+
demo.launch()
|
| 77 |
|
| 78 |
|