SamanthaStorm commited on
Commit
e70a773
Β·
verified Β·
1 Parent(s): a67fc56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
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)