SamanthaStorm commited on
Commit
103e205
·
verified ·
1 Parent(s): 512a56e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -413,8 +413,9 @@ def compute_abuse_score(matched_scores, sentiment):
413
 
414
 
415
  def analyze_single_message(text, thresholds):
 
416
  motif_hits, matched_phrases = detect_motifs(text)
417
-
418
  # Get emotion profile
419
  emotion_profile = get_emotion_profile(text)
420
  sentiment_score = emotion_profile.get("anger", 0) + emotion_profile.get("disgust", 0)
@@ -549,7 +550,7 @@ def analyze_composite(msg1, msg2, msg3, *answers_and_none):
549
  messages = [msg1, msg2, msg3]
550
  active = [(m, f"Message {i+1}") for i, m in enumerate(messages) if m.strip()]
551
  if not active:
552
- return "Please enter at least one message."
553
 
554
  # Flag any threat phrases present in the messages
555
  import re
 
413
 
414
 
415
  def analyze_single_message(text, thresholds):
416
+ stage = 1
417
  motif_hits, matched_phrases = detect_motifs(text)
418
+
419
  # Get emotion profile
420
  emotion_profile = get_emotion_profile(text)
421
  sentiment_score = emotion_profile.get("anger", 0) + emotion_profile.get("disgust", 0)
 
550
  messages = [msg1, msg2, msg3]
551
  active = [(m, f"Message {i+1}") for i, m in enumerate(messages) if m.strip()]
552
  if not active:
553
+ return "Please enter at least one message.", None
554
 
555
  # Flag any threat phrases present in the messages
556
  import re