Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -80,9 +80,6 @@ def calculate_abuse_level(scores, thresholds, motif_hits=None):
|
|
80 |
weight = PATTERN_WEIGHTS.get(label, 1.0)
|
81 |
weighted_scores.append(score * weight)
|
82 |
base_score = round(np.mean(weighted_scores) * 100, 2) if weighted_scores else 0.0
|
83 |
-
# Escalate risk if user checks a critical context box
|
84 |
-
if context_flags and abuse_level < 15:
|
85 |
-
abuse_level = 15 # bump to at least Mild Concern
|
86 |
|
87 |
motif_hits = motif_hits or []
|
88 |
if any(label in motif_hits for label in {"physical_threat", "suicidal_threat", "extreme_control"}):
|
|
|
80 |
weight = PATTERN_WEIGHTS.get(label, 1.0)
|
81 |
weighted_scores.append(score * weight)
|
82 |
base_score = round(np.mean(weighted_scores) * 100, 2) if weighted_scores else 0.0
|
|
|
|
|
|
|
83 |
|
84 |
motif_hits = motif_hits or []
|
85 |
if any(label in motif_hits for label in {"physical_threat", "suicidal_threat", "extreme_control"}):
|