Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -257,6 +257,14 @@ def get_emotional_tone_tag(emotions, sentiment, patterns, abuse_score):
|
|
257 |
sentiment == "undermining"
|
258 |
):
|
259 |
return "emotional instability"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
|
261 |
return None
|
262 |
# π New DARVO score model (regression-based)
|
|
|
257 |
sentiment == "undermining"
|
258 |
):
|
259 |
return "emotional instability"
|
260 |
+
|
261 |
+
# 15. Hostile Moralizing
|
262 |
+
if (
|
263 |
+
any(p in patterns for p in ["dismissiveness", "blame shifting"]) and
|
264 |
+
sentiment == "undermining" and
|
265 |
+
any(word in text.lower() for word in ["victim", "sympathy", "expect", "started"])
|
266 |
+
):
|
267 |
+
return "hostile moralizing"
|
268 |
|
269 |
return None
|
270 |
# π New DARVO score model (regression-based)
|