SamanthaStorm commited on
Commit
a6c4863
·
verified ·
1 Parent(s): 640d9ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -3
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"}):