Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -218,13 +218,10 @@ def generate_risk_snippet(abuse_score, top_label, escalation_score, stage):
|
|
| 218 |
base += f"\nDetected Pattern: **{pattern_label} ({pattern_score})**\n"
|
| 219 |
base += "🧠 You can review the pattern in context. This tool highlights possible dynamics—not judgments."
|
| 220 |
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
"""
|
| 226 |
-
if not matched_scores:
|
| 227 |
-
return 0
|
| 228 |
|
| 229 |
# Weighted average of passed patterns
|
| 230 |
weighted_total = sum(score * weight for _, score, weight in matched_scores)
|
|
|
|
| 218 |
base += f"\nDetected Pattern: **{pattern_label} ({pattern_score})**\n"
|
| 219 |
base += "🧠 You can review the pattern in context. This tool highlights possible dynamics—not judgments."
|
| 220 |
|
| 221 |
+
return base
|
| 222 |
+
def compute_abuse_score(matched_scores, sentiment):
|
| 223 |
+
if not matched_scores:
|
| 224 |
+
return 0
|
|
|
|
|
|
|
|
|
|
| 225 |
|
| 226 |
# Weighted average of passed patterns
|
| 227 |
weighted_total = sum(score * weight for _, score, weight in matched_scores)
|