Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -125,10 +125,11 @@ def get_emotional_tone_tag(emotion_profile, patterns, text_lower):
|
|
125 |
if lex_counts["joy"] > 0 and any(k in text_lower for k in ["support","hope","grace"]):
|
126 |
return "supportive"
|
127 |
|
128 |
-
# 1. Performative Regret
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
132 |
|
133 |
# 2. Coercive Warmth
|
134 |
if (joy > 0.3 or sadness > 0.4) \
|
|
|
125 |
if lex_counts["joy"] > 0 and any(k in text_lower for k in ["support","hope","grace"]):
|
126 |
return "supportive"
|
127 |
|
128 |
+
+ # 1. Performative Regret
|
129 |
+
+ # → only when we see one of those patterns, not just lexicon hits
|
130 |
+
+ if sadness > 0.4 \
|
131 |
+
+ and any(p in patterns for p in ["blame shifting","guilt tripping","recovery phase"]):
|
132 |
+
+ return "performative regret"
|
133 |
|
134 |
# 2. Coercive Warmth
|
135 |
if (joy > 0.3 or sadness > 0.4) \
|