SamanthaStorm commited on
Commit
3cc85b8
·
verified ·
1 Parent(s): c0077e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -64,11 +64,9 @@ def get_emotional_tone_tag(emotion_profile, patterns, text_lower):
64
  fear = emotion_profile.get("fear", 0)
65
  surprise = emotion_profile.get("surprise", 0)
66
 
67
- def get_emotional_tone_tag(emotion_profile, patterns, text_lower):
68
- - sadness = emotion_profile.get("sadness", 0)
69
- + # 0. Support override: any explicit “support” language should win
70
- + if "support" in text_lower or "hope" in text_lower or "grace" in text_lower:
71
- + return "supportive"
72
  if (
73
  sadness > 0.4 and
74
  any(p in patterns for p in ["blame shifting", "guilt tripping", "recovery phase"])
 
64
  fear = emotion_profile.get("fear", 0)
65
  surprise = emotion_profile.get("surprise", 0)
66
 
67
+ def get_emotional_tone_tag(emotion_profile, patterns, text_lower):
68
+ if "support" in text_lower or "hope" in text_lower or "grace" in text_lower:
69
+ return "supportive"
 
 
70
  if (
71
  sadness > 0.4 and
72
  any(p in patterns for p in ["blame shifting", "guilt tripping", "recovery phase"])