Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,13 +43,13 @@ THRESHOLDS = {
|
|
43 |
# ——— 3) Single-message analysis ——————————————————————————————————————————————
|
44 |
def analyze_message(text):
|
45 |
"""
|
46 |
-
Runs
|
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 |
"""
|
52 |
-
|
53 |
emotion_profile = get_emotion_profile(text)
|
54 |
|
55 |
# get raw model scores
|
@@ -98,7 +98,7 @@ iface = gr.Interface(
|
|
98 |
inputs=message_inputs,
|
99 |
outputs=gr.Textbox(label="Analysis"),
|
100 |
title="Tether Analyzer (no abuse-score / no DARVO)",
|
101 |
-
description="
|
102 |
)
|
103 |
|
104 |
if __name__ == "__main__":
|
|
|
43 |
# ——— 3) Single-message analysis ——————————————————————————————————————————————
|
44 |
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 |
"""
|
52 |
+
|
53 |
emotion_profile = get_emotion_profile(text)
|
54 |
|
55 |
# get raw model scores
|
|
|
98 |
inputs=message_inputs,
|
99 |
outputs=gr.Textbox(label="Analysis"),
|
100 |
title="Tether Analyzer (no abuse-score / no DARVO)",
|
101 |
+
description="emotions, and active abuse-patterns only."
|
102 |
)
|
103 |
|
104 |
if __name__ == "__main__":
|