DenverJones commited on
Commit
8211128
·
verified ·
1 Parent(s): 91496ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
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
- # ... (Gradio UI code as before)
102
 
103
- demo.launch()
 
 
 
 
 
 
 
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