DreamStream-1 commited on
Commit
c1e956a
·
verified ·
1 Parent(s): 6c32a43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -103,35 +103,35 @@ def generate_suggestions(emotion):
103
  emotion_key = emotion.lower()
104
  suggestions = {
105
  "joy": [
106
- {"Title": "Relaxation Techniques", "Link": "https://www.helpguide.org/mental-health/meditation/mindful-breathing-meditation"},
107
- {"Title": "Dealing with Stress", "Link": "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"},
108
- {"Title": "Emotional Wellness Toolkit", "Link": "https://www.nih.gov/health-information/emotional-wellness-toolkit"},
109
- {"Title": "Relaxation Video", "Link": "https://youtu.be/m1vaUGtyo-A"},
110
  ],
111
  "anger": [
112
- {"Title": "Emotional Wellness Toolkit", "Link": "https://www.nih.gov/health-information/emotional-wellness-toolkit"},
113
- {"Title": "Stress Management Tips", "Link": "https://www.health.harvard.edu/health-a-to-z"},
114
- {"Title": "Dealing with Anger", "Link": "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"},
115
- {"Title": "Relaxation Video", "Link": "https://youtu.be/MIc299Flibs"},
116
  ],
117
  "fear": [
118
- {"Title": "Mindfulness Practices", "Link": "https://www.helpguide.org/mental-health/meditation/mindful-breathing-meditation"},
119
- {"Title": "Coping with Anxiety", "Link": "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"},
120
- {"Title": "Emotional Wellness Toolkit", "Link": "https://www.nih.gov/health-information/emotional-wellness-toolkit"},
121
- {"Title": "Relaxation Video", "Link": "https://youtu.be/yGKKz185M5o"},
122
  ],
123
  "sadness": [
124
- {"Title": "Emotional Wellness Toolkit", "Link": "https://www.nih.gov/health-information/emotional-wellness-toolkit"},
125
- {"Title": "Dealing with Anxiety", "Link": "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"},
126
- {"Title": "Relaxation Video", "Link": "https://youtu.be/-e-4Kx5px_I"},
127
  ],
128
  "surprise": [
129
- {"Title": "Managing Stress", "Link": "https://www.health.harvard.edu/health-a-to-z"},
130
- {"Title": "Coping Strategies", "Link": "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"},
131
- {"Title": "Relaxation Video", "Link": "https://youtu.be/m1vaUGtyo-A"},
132
  ],
133
  }
134
- return suggestions.get(emotion_key, [{"Title": "No specific suggestions available.", "Link": "#"}])
135
 
136
  def get_health_professionals_and_map(location, query):
137
  """Search nearby healthcare professionals using Google Maps API."""
 
103
  emotion_key = emotion.lower()
104
  suggestions = {
105
  "joy": [
106
+ ["Relaxation Techniques", "https://www.helpguide.org/mental-health/meditation/mindful-breathing-meditation"],
107
+ ["Dealing with Stress", "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"],
108
+ ["Emotional Wellness Toolkit", "https://www.nih.gov/health-information/emotional-wellness-toolkit"],
109
+ ["Relaxation Video", "https://youtu.be/m1vaUGtyo-A"],
110
  ],
111
  "anger": [
112
+ ["Emotional Wellness Toolkit", "https://www.nih.gov/health-information/emotional-wellness-toolkit"],
113
+ ["Stress Management Tips", "https://www.health.harvard.edu/health-a-to-z"],
114
+ ["Dealing with Anger", "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"],
115
+ ["Relaxation Video", "https://youtu.be/MIc299Flibs"],
116
  ],
117
  "fear": [
118
+ ["Mindfulness Practices", "https://www.helpguide.org/mental-health/meditation/mindful-breathing-meditation"],
119
+ ["Coping with Anxiety", "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"],
120
+ ["Emotional Wellness Toolkit", "https://www.nih.gov/health-information/emotional-wellness-toolkit"],
121
+ ["Relaxation Video", "https://youtu.be/yGKKz185M5o"],
122
  ],
123
  "sadness": [
124
+ ["Emotional Wellness Toolkit", "https://www.nih.gov/health-information/emotional-wellness-toolkit"],
125
+ ["Dealing with Anxiety", "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"],
126
+ ["Relaxation Video", "https://youtu.be/-e-4Kx5px_I"],
127
  ],
128
  "surprise": [
129
+ ["Managing Stress", "https://www.health.harvard.edu/health-a-to-z"],
130
+ ["Coping Strategies", "https://www.helpguide.org/mental-health/anxiety/tips-for-dealing-with-anxiety"],
131
+ ["Relaxation Video", "https://youtu.be/m1vaUGtyo-A"],
132
  ],
133
  }
134
+ return suggestions.get(emotion_key, [["No specific suggestions available.", "#"]]) # default suggestion
135
 
136
  def get_health_professionals_and_map(location, query):
137
  """Search nearby healthcare professionals using Google Maps API."""