Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -230,7 +230,12 @@ def analyze_composite(msg1, date1, msg2, date2, msg3, date3, *answers_and_none):
|
|
230 |
most_common_stage = max(set(stage_list), key=stage_list.count)
|
231 |
composite_abuse = int(round(sum(abuse_scores)/len(abuse_scores)))
|
232 |
# extract top label from each result dict
|
233 |
-
top_labels = [
|
|
|
|
|
|
|
|
|
|
|
234 |
dates_used = [d or 'Undated' for _,d in results]
|
235 |
# common stage
|
236 |
stage_list = [r[0]['stage'] for r,_ in results]
|
|
|
230 |
most_common_stage = max(set(stage_list), key=stage_list.count)
|
231 |
composite_abuse = int(round(sum(abuse_scores)/len(abuse_scores)))
|
232 |
# extract top label from each result dict
|
233 |
+
top_labels = [
|
234 |
+
res['top_patterns'][0][0]
|
235 |
+
if res['top_patterns']
|
236 |
+
else 'None'
|
237 |
+
for res, _ in results]['top_patterns'][0][0] if r[0]['top_patterns'] else 'None' for r,_ in results
|
238 |
+
]
|
239 |
dates_used = [d or 'Undated' for _,d in results]
|
240 |
# common stage
|
241 |
stage_list = [r[0]['stage'] for r,_ in results]
|