Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -220,10 +220,10 @@ def generate_risk_snippet(abuse_score, top_label, escalation_score, stage):
|
|
220 |
|
221 |
return base
|
222 |
def compute_abuse_score(matched_scores, sentiment):
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
return 0
|
228 |
|
229 |
# Weighted average of passed patterns
|
|
|
220 |
|
221 |
return base
|
222 |
def compute_abuse_score(matched_scores, sentiment):
|
223 |
+
"""
|
224 |
+
Calculates abuse score based on passed patterns, their weights, and emotional context.
|
225 |
+
"""
|
226 |
+
if not matched_scores:
|
227 |
return 0
|
228 |
|
229 |
# Weighted average of passed patterns
|