Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -128,7 +128,7 @@ def analyze_messages(input_text, risk_flags):
|
|
128 |
abuse_level = calculate_abuse_level(scores, adjusted_thresholds, motif_hits=[label for label, _ in matched_phrases])
|
129 |
abuse_description = interpret_abuse_level(abuse_level)
|
130 |
# Escalate risk if user checks a critical context box
|
131 |
-
if
|
132 |
abuse_level = 15 # bump to at least Mild Concern
|
133 |
|
134 |
abuse_type, abuser_profile, advice = determine_abuse_type(pattern_labels_used)
|
|
|
128 |
abuse_level = calculate_abuse_level(scores, adjusted_thresholds, motif_hits=[label for label, _ in matched_phrases])
|
129 |
abuse_description = interpret_abuse_level(abuse_level)
|
130 |
# Escalate risk if user checks a critical context box
|
131 |
+
if contextual_flags and abuse_level < 15:
|
132 |
abuse_level = 15 # bump to at least Mild Concern
|
133 |
|
134 |
abuse_type, abuser_profile, advice = determine_abuse_type(pattern_labels_used)
|