SamanthaStorm commited on
Commit
c0077e7
·
verified ·
1 Parent(s): 5ebe61a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -64,7 +64,11 @@ 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
- # 1. Performative Regret
 
 
 
 
68
  if (
69
  sadness > 0.4 and
70
  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
+ - 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"])