Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,10 @@ def analyze_messages(input_text):
|
|
80 |
"Moderate" if danger_flag_count == 1 else
|
81 |
"Low"
|
82 |
)
|
83 |
-
|
|
|
|
|
|
|
84 |
# Set resources
|
85 |
if danger_assessment == "High":
|
86 |
resources = (
|
|
|
80 |
"Moderate" if danger_flag_count == 1 else
|
81 |
"Low"
|
82 |
)
|
83 |
+
# Treat high-scoring danger cues as abuse patterns as well
|
84 |
+
for danger_label in ["suicidal_threat", "physical_threat", "extreme_control"]:
|
85 |
+
if scores[LABELS.index(danger_label)] > THRESHOLDS[danger_label]:
|
86 |
+
pattern_count += 1
|
87 |
# Set resources
|
88 |
if danger_assessment == "High":
|
89 |
resources = (
|