Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -284,7 +284,8 @@ 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 |
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
|
@@ -292,7 +293,6 @@ def get_emotional_tone_tag(text, sentiment, patterns, abuse_score):
|
|
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
|
|
|
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 |
if (
|
290 |
(any(phrase in text_lower for phrase in future_consequences) or
|
291 |
any(end in text_lower for end in dismissive_endings)) and
|
|
|
293 |
sadness > 0.6 and
|
294 |
all(e < 0.1 for e in [anger, disgust, neutral])
|
295 |
):
|
|
|
296 |
return "predictive punishment"
|
297 |
|
298 |
# 1. Performative Regret
|