Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -149,6 +149,8 @@ def analyze_composite(msg1, date1, msg2, date2, msg3, date3, *answers_and_none):
|
|
149 |
stage_list = [r[0]["stage"] for r in results]
|
150 |
|
151 |
most_common_stage = max(set(stage_list), key=stage_list.count)
|
|
|
|
|
152 |
out = f"Abuse Intensity: {composite_abuse}%\n"
|
153 |
if escalation_score is None:
|
154 |
out += "Escalation Potential: Unknown (Checklist not completed)\n"
|
|
|
149 |
stage_list = [r[0]["stage"] for r in results]
|
150 |
|
151 |
most_common_stage = max(set(stage_list), key=stage_list.count)
|
152 |
+
# compute the average abuse score across all active messages
|
153 |
+
composite_abuse = int(round(sum(abuse_scores) / len(abuse_scores)))
|
154 |
out = f"Abuse Intensity: {composite_abuse}%\n"
|
155 |
if escalation_score is None:
|
156 |
out += "Escalation Potential: Unknown (Checklist not completed)\n"
|