SamanthaStorm commited on
Commit
977855e
·
verified ·
1 Parent(s): f750cbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -277,6 +277,8 @@ def analyze_single_message(text, thresholds):
277
  emotion_profile = get_emotion_profile(text)
278
 
279
  # Derive sentiment from emotion intensity
 
 
280
  sentiment = "undermining" if sentiment_score > 0.4 else "supportive"
281
 
282
  weapon_flag = detect_weapon_language(text)
 
277
  emotion_profile = get_emotion_profile(text)
278
 
279
  # Derive sentiment from emotion intensity
280
+ emotion_profile = get_emotion_profile(text)
281
+ sentiment_score = emotion_profile.get("anger", 0) + emotion_profile.get("disgust", 0)
282
  sentiment = "undermining" if sentiment_score > 0.4 else "supportive"
283
 
284
  weapon_flag = detect_weapon_language(text)