Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,10 +24,12 @@ if st.button("Send"):
|
|
| 24 |
if user_input: # Check if the user has provided input
|
| 25 |
# Construct the message to instruct the model to behave like a therapist
|
| 26 |
prompt = f"""
|
| 27 |
-
You are a therapist with a strong focus on providing practical, actionable advice.
|
| 28 |
-
Respond in a supportive, empathetic, and non-judgmental manner to the following statement.
|
| 29 |
-
Offer at least
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
"""
|
| 32 |
|
| 33 |
# Get the response from the model
|
|
@@ -36,4 +38,4 @@ if st.button("Send"):
|
|
| 36 |
# Show the response
|
| 37 |
st.text_area("AI Companion Response:", response, height=200)
|
| 38 |
else:
|
| 39 |
-
st.warning("Please enter something to continue the conversation.")
|
|
|
|
| 24 |
if user_input: # Check if the user has provided input
|
| 25 |
# Construct the message to instruct the model to behave like a therapist
|
| 26 |
prompt = f"""
|
| 27 |
+
You are a therapist with a strong focus on providing practical, actionable advice.
|
| 28 |
+
Respond in a supportive, empathetic, and non-judgmental manner to the following statement.
|
| 29 |
+
Offer at least 3 **specific** strategies or coping techniques that the user can try immediately to manage or alleviate their anxiety.
|
| 30 |
+
These could include emotional regulation techniques (like grounding exercises, breathing techniques),
|
| 31 |
+
self-care practices (like self-compassion or taking breaks), or mindset shifts (like reframing negative thoughts or focusing on what can be controlled).
|
| 32 |
+
The user is feeling anxious about the state of the world after the election: {user_input}
|
| 33 |
"""
|
| 34 |
|
| 35 |
# Get the response from the model
|
|
|
|
| 38 |
# Show the response
|
| 39 |
st.text_area("AI Companion Response:", response, height=200)
|
| 40 |
else:
|
| 41 |
+
st.warning("Please enter something to continue the conversation.")
|