Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -95,6 +95,23 @@ def get_emotional_tone_tag(emotion_profile, patterns):
|
|
95 |
any(p in patterns for p in ["dismissiveness", "obscure language"])
|
96 |
):
|
97 |
return "toxic resignation"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
return None
|
100 |
|
|
|
95 |
any(p in patterns for p in ["dismissiveness", "obscure language"])
|
96 |
):
|
97 |
return "toxic resignation"
|
98 |
+
|
99 |
+
# 8. Indignant Reproach
|
100 |
+
if (
|
101 |
+
anger > 0.5 and
|
102 |
+
any(p in patterns for p in ["guilt tripping","contradictory statements"]
|
103 |
+
):
|
104 |
+
return "indignant reproach"
|
105 |
+
if (
|
106 |
+
anger > 0.6 and patterns
|
107 |
+
):
|
108 |
+
return "confrontational"
|
109 |
+
# 8. Passive Aggression
|
110 |
+
if neutral > 0.6 and any(p in patterns for p in ["dismissiveness","projection"]):
|
111 |
+
return "passive aggression"
|
112 |
+
# 9. Sarcastic Mockery
|
113 |
+
if joy > 0.3 and "insults" in patterns:
|
114 |
+
return "sarcastic mockery"
|
115 |
|
116 |
return None
|
117 |
|