DreamStream-1 commited on
Commit
eefcaa7
Β·
verified Β·
1 Parent(s): 4568d77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -2,6 +2,7 @@ import os
2
  import gradio as gr
3
  import nltk
4
  import numpy as np
 
5
  import tflearn
6
  import random
7
  import json
@@ -16,6 +17,9 @@ import torch
16
  # Disable GPU usage for TensorFlow
17
  os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
18
 
 
 
 
19
  # Ensure necessary NLTK resources are downloaded
20
  nltk.download('punkt')
21
 
@@ -157,13 +161,7 @@ def generate_suggestions(emotion):
157
  ],
158
  'sadness': [
159
  {"Title": "Overcoming Sadness 🌈", "Subject": "Well-being", "Link": '<a href="https://www.helpguide.org/mental-health/depression.htm" target="_blank">Overcoming Sadness</a>'},
160
- {"Title": "Self-care Practices 🌿", "Subject": "Self-care", "Link": '<a href="https://www.psychologytoday.com/us/blog/pieces-mind/201908/self-care-for-your-mental-health" target="_blank">Self-Care for Mental Health</a>'},
161
- {"Title": "Managing Grief πŸ’", "Subject": "Grief Management", "Link": '<a href="https://www.helpguide.org/mental-health/grief.htm" target="_blank">HelpGuide on Grief</a>'},
162
- {"Title": "Mindfulness & Meditation πŸ’†", "Subject": "Meditation", "Link": '<a href="https://www.meditationandmindfulness.com" target="_blank">Mindfulness & Meditation</a>'}
163
- ],
164
- 'fear': [
165
- {"Title": "Managing Fear & Anxiety πŸ’‘", "Subject": "Mental Health", "Link": '<a href="https://www.psychologytoday.com/us/articles/anxiety" target="_blank">Psychology Today on Anxiety</a>'},
166
- {"Title": "Building Confidence πŸ’ͺ", "Subject": "Self-Confidence", "Link": '<a href="https://www.helpguide.org/mental-health/self-confidence.htm" target="_blank">Self-Confidence Guide</a>'},
167
  {"Title": "Breathing Exercises πŸ§˜β€β™€οΈ", "Subject": "Breathing", "Link": '<a href="https://www.helpguide.org/mental-health/meditation/mindful-breathing-meditation" target="_blank">Mindful Breathing Meditation</a>'},
168
  {"Title": "Relaxation Tips 🌿", "Subject": "Relaxation", "Link": '<a href="https://www.helpguide.org/mental-health/stress-relief.htm" target="_blank">Stress Relief Tips</a>'}
169
  ]
 
2
  import gradio as gr
3
  import nltk
4
  import numpy as np
5
+ import tensorflow as tf
6
  import tflearn
7
  import random
8
  import json
 
17
  # Disable GPU usage for TensorFlow
18
  os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
19
 
20
+ # Suppress warnings related to missing CUDA libraries
21
+ os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
22
+
23
  # Ensure necessary NLTK resources are downloaded
24
  nltk.download('punkt')
25
 
 
161
  ],
162
  'sadness': [
163
  {"Title": "Overcoming Sadness 🌈", "Subject": "Well-being", "Link": '<a href="https://www.helpguide.org/mental-health/depression.htm" target="_blank">Overcoming Sadness</a>'},
164
+ {"Title": "Building Self-Esteem πŸ’ͺ", "Subject": "Confidence", "Link": '<a href="https://www.helpguide.org/mental-health/self-confidence.htm" target="_blank">Self-Confidence Guide</a>'},
 
 
 
 
 
 
165
  {"Title": "Breathing Exercises πŸ§˜β€β™€οΈ", "Subject": "Breathing", "Link": '<a href="https://www.helpguide.org/mental-health/meditation/mindful-breathing-meditation" target="_blank">Mindful Breathing Meditation</a>'},
166
  {"Title": "Relaxation Tips 🌿", "Subject": "Relaxation", "Link": '<a href="https://www.helpguide.org/mental-health/stress-relief.htm" target="_blank">Stress Relief Tips</a>'}
167
  ]