SamanthaStorm commited on
Commit
8cbdd57
·
verified ·
1 Parent(s): cd0b54d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -346,11 +346,11 @@ def analyze_single_message(text, thresholds):
346
  emotion_profile = get_emotion_profile(text)
347
  sentiment_score = emotion_profile.get("anger", 0) + emotion_profile.get("disgust", 0)
348
 
349
- # Override if neutral tone masks abusive content
350
  if emotion_profile.get("neutral", 0) > 0.85 and any(
351
  scores[label] > THRESHOLDS[label]
352
- for label in ["control", "threat", "blame shifting"]
353
- ):
354
  sentiment = "undermining"
355
  else:
356
  sentiment = "undermining" if sentiment_score > 0.25 else "supportive"
 
346
  emotion_profile = get_emotion_profile(text)
347
  sentiment_score = emotion_profile.get("anger", 0) + emotion_profile.get("disgust", 0)
348
 
349
+ # Override if neutral tone masks abusive content
350
  if emotion_profile.get("neutral", 0) > 0.85 and any(
351
  scores[label] > THRESHOLDS[label]
352
+ for label in ["control", "threat", "blame shifting"]
353
+ ):
354
  sentiment = "undermining"
355
  else:
356
  sentiment = "undermining" if sentiment_score > 0.25 else "supportive"