SamanthaStorm commited on
Commit
c87375a
·
verified ·
1 Parent(s): 818e2e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -3
app.py CHANGED
@@ -45,7 +45,6 @@ def analyze_message(text):
45
  """
46
  Runs emotion profiling, and the abuse-pattern classifier.
47
  Returns a dict with:
48
- - matched_phrases: list of raw regex hits
49
  - emotion_profile: { emotion: score }
50
  - active_patterns: [ labels above their threshold ]
51
  """
@@ -62,7 +61,6 @@ def analyze_message(text):
62
  active = [lab for lab, sc in zip(LABELS, scores) if sc >= THRESHOLDS[lab]]
63
 
64
  return {
65
- "matched_phrases": matched_phrases,
66
  "emotion_profile": emotion_profile,
67
  "active_patterns": active
68
  }
@@ -81,7 +79,6 @@ def analyze_composite(*texts):
81
  r = analyze_message(txt)
82
  block = (
83
  f"── Message {idx} ──\n"
84
- f"Matched Phrases: {r['matched_phrases']}\n"
85
  f"Emotion Profile: {r['emotion_profile']}\n"
86
  f"Active Patterns: {r['active_patterns']}\n"
87
  )
 
45
  """
46
  Runs emotion profiling, and the abuse-pattern classifier.
47
  Returns a dict with:
 
48
  - emotion_profile: { emotion: score }
49
  - active_patterns: [ labels above their threshold ]
50
  """
 
61
  active = [lab for lab, sc in zip(LABELS, scores) if sc >= THRESHOLDS[lab]]
62
 
63
  return {
 
64
  "emotion_profile": emotion_profile,
65
  "active_patterns": active
66
  }
 
79
  r = analyze_message(txt)
80
  block = (
81
  f"── Message {idx} ──\n"
 
82
  f"Emotion Profile: {r['emotion_profile']}\n"
83
  f"Active Patterns: {r['active_patterns']}\n"
84
  )