Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,15 +43,16 @@ def generate_response(user_input):
|
|
43 |
bot_output = tokenizer.decode(chat_history_ids[0], skip_special_tokens=True)
|
44 |
|
45 |
# Build a more empathetic and thoughtful response
|
46 |
-
response = f"{bot_output}\n\nI'm really sorry you're feeling like this. It's okay to feel
|
47 |
|
48 |
# Add coping strategies based on the situation
|
49 |
-
if "
|
50 |
-
response += "\n\
|
51 |
-
elif "
|
52 |
-
response += "\n\
|
53 |
-
|
54 |
-
|
|
|
55 |
|
56 |
return response
|
57 |
|
|
|
43 |
bot_output = tokenizer.decode(chat_history_ids[0], skip_special_tokens=True)
|
44 |
|
45 |
# Build a more empathetic and thoughtful response
|
46 |
+
response = f"{bot_output}\n\nI'm really sorry you're feeling like this. It's completely okay to feel sad and overwhelmed. Your emotions are valid, and it's important to acknowledge them rather than push them aside. Sometimes, hunger can make everything feel more intense, so taking care of your body is just as important as your emotional well-being."
|
47 |
|
48 |
# Add coping strategies based on the situation
|
49 |
+
if "hunger" in user_input.lower():
|
50 |
+
response += "\n\nIf possible, try to get something nourishing to eat. A healthy snack or meal can help soothe the physical discomfort you're feeling and also support your emotional resilience. Remember, it's okay to take breaks for your well-being."
|
51 |
+
elif "overwhelmed" in user_input.lower():
|
52 |
+
response += "\n\nIt’s okay to feel like you're carrying a heavy load. Break down your tasks into small, manageable pieces and give yourself permission to take things one step at a time. You don't need to have everything figured out at once. Be gentle with yourself."
|
53 |
+
|
54 |
+
# Add general supportive message
|
55 |
+
response += "\n\nYou're doing the best you can, and it's okay to ask for help when needed. Remember that it's okay to not be okay sometimes. Please be kind to yourself during this challenging time."
|
56 |
|
57 |
return response
|
58 |
|