SamanthaStorm commited on
Commit
c39a1d0
·
verified ·
1 Parent(s): 4096bc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -284,6 +284,15 @@ def get_emotional_tone_tag(text, sentiment, patterns, abuse_score):
284
  any(p in ["dismissiveness", "control"] for p in patterns) and
285
  (disgust > 0.2 or neutral > 0.3 or anger > 0.2) # Lowered thresholds
286
  ):
 
 
 
 
 
 
 
 
 
287
  return "predictive punishment"
288
 
289
  # 1. Performative Regret
 
284
  any(p in ["dismissiveness", "control"] for p in patterns) and
285
  (disgust > 0.2 or neutral > 0.3 or anger > 0.2) # Lowered thresholds
286
  ):
287
+ return "predictive punishment
288
+ if (
289
+ (any(phrase in text_lower for phrase in future_consequences) or
290
+ any(end in text_lower for end in dismissive_endings)) and
291
+ any(p in ["dismissiveness", "control"] for p in patterns) and
292
+ sadness > 0.6 and
293
+ all(e < 0.1 for e in [anger, disgust, neutral])
294
+ ):
295
+ logger.debug("🧊 Cold predictive punishment tone triggered (sadness-dominant)")
296
  return "predictive punishment"
297
 
298
  # 1. Performative Regret