Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -148,7 +148,14 @@ def analyze_composite(msg1, date1, msg2, date2, msg3, date3, *answers_and_none):
|
|
148 |
dates_used = [r[1] or "Undated" for r in results]
|
149 |
|
150 |
composite_abuse = int(round(sum(abuse_scores) / len(abuse_scores)))
|
151 |
-
most_common_stage = max(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
out = f"Abuse Intensity: {composite_abuse}%\n"
|
154 |
if escalation_score is None:
|
|
|
148 |
dates_used = [r[1] or "Undated" for r in results]
|
149 |
|
150 |
composite_abuse = int(round(sum(abuse_scores) / len(abuse_scores)))
|
151 |
+
- most_common_stage = max(
|
152 |
+
- set(r[0]["stage"] for r in results),
|
153 |
+
- key=lambda x: [r[0]["stage"] for r in results].count
|
154 |
+
- )
|
155 |
+
+ most_common_stage = max(
|
156 |
+
+ set(r[0]["stage"] for r in results),
|
157 |
+
+ key=lambda x: [r[0]["stage"] for r in results].count(x)
|
158 |
+
+ )
|
159 |
|
160 |
out = f"Abuse Intensity: {composite_abuse}%\n"
|
161 |
if escalation_score is None:
|