Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,8 +96,14 @@ def chat_with_agent(user_input, history):
|
|
| 96 |
return history
|
| 97 |
|
| 98 |
|
| 99 |
-
# Gradio UI
|
| 100 |
-
with gr.Blocks() as demo:
|
| 101 |
-
#
|
| 102 |
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
return history
|
| 97 |
|
| 98 |
|
| 99 |
+
# Gradio UI (Corrected Indentation)
|
| 100 |
+
with gr.Blocks() as demo: # Start of 'with' block
|
| 101 |
+
gr.Markdown("### Welcome to MotivationAgent! 🌟\nType a message to receive a motivational quote or an uplifting response.")
|
| 102 |
|
| 103 |
+
chatbot = gr.Chatbot(label="MotivationAgent", type="messages")
|
| 104 |
+
user_input = gr.Textbox(placeholder="Ask me for motivation... (e.g., 'I need inspiration')")
|
| 105 |
+
|
| 106 |
+
submit_btn = gr.Button("Send")
|
| 107 |
+
submit_btn.click(chat_with_agent, inputs=[user_input, chatbot], outputs=chatbot)
|
| 108 |
+
|
| 109 |
+
demo.launch() # This line is now outside the 'with' block
|