Bey007 commited on
Commit
c17e34b
·
verified ·
1 Parent(s): afcc215

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
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 overwhelmed and to let those emotions out. It's important to be kind to yourself during difficult times."
47
 
48
  # Add coping strategies based on the situation
49
- if "crying" in user_input.lower():
50
- response += "\n\nCrying can be a powerful release. Letting yourself feel what you're going through can sometimes help you move forward. After you’ve given yourself space to cry, you might find it helpful to talk with someone you trust or take a break to refresh your mind."
51
- elif "work" in user_input.lower():
52
- response += "\n\nWork can feel like an unending cycle, especially when you're under pressure. Have you tried breaking your tasks down into smaller, manageable pieces? It might help to focus on one thing at a time and give yourself short breaks to recharge."
53
- else:
54
- response += "\n\nRemember, it’s okay to take things slow. Taking care of your emotional well-being is just as important as anything else."
 
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