tarrasyed19472007 commited on
Commit
db6ea9b
·
verified ·
1 Parent(s): bac682d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -82,7 +82,11 @@ def main():
82
  detected_emotion = analysis_result[0]['label']
83
 
84
  # Map detected emotion to a mood state
85
- mood_mapping = {"LABEL_0": "NEGATIVE", "LABEL_1": "POSITIVE", "LABEL_2": "NEUTRAL"}
 
 
 
 
86
  mood = mood_mapping.get(detected_emotion, "NEUTRAL")
87
 
88
  st.write(f"Detected Mood: {mood}")
 
82
  detected_emotion = analysis_result[0]['label']
83
 
84
  # Map detected emotion to a mood state
85
+ mood_mapping = {
86
+ "LABEL_0": "NEGATIVE", # for negative emotions
87
+ "LABEL_1": "POSITIVE", # for positive emotions
88
+ "LABEL_2": "NEUTRAL", # for neutral emotions
89
+ }
90
  mood = mood_mapping.get(detected_emotion, "NEUTRAL")
91
 
92
  st.write(f"Detected Mood: {mood}")