Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -280,10 +280,17 @@ def analyze_composite(msg1, msg2, msg3, *answers_and_none):
|
|
280 |
out += f"Escalation Potential: {('High' if escalation_score >= 16 else 'Moderate' if escalation_score >= 8 else 'Low')} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})\n"
|
281 |
out += "π¨ This indicates how many serious risk factors are present based on your answers to the safety checklist.\n\n"
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
out += generate_risk_snippet(composite_abuse, top_label, escalation_score, most_common_stage)
|
288 |
out += f"\n\n{stage_text}"
|
289 |
out += darvo_blurb
|
|
|
280 |
out += f"Escalation Potential: {('High' if escalation_score >= 16 else 'Moderate' if escalation_score >= 8 else 'Low')} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})\n"
|
281 |
out += "π¨ This indicates how many serious risk factors are present based on your answers to the safety checklist.\n\n"
|
282 |
|
283 |
+
if escalation_score is None:
|
284 |
+
out += "Escalation Potential: Unknown (Checklist not completed)\n"
|
285 |
+
out += "π *This section was not completed. Escalation potential is unknown.*\n\n"
|
286 |
+
else:
|
287 |
+
risk_level = (
|
288 |
+
"High" if escalation_score >= 16 else
|
289 |
+
"Moderate" if escalation_score >= 8 else
|
290 |
+
"Low"
|
291 |
+
)
|
292 |
+
out += f"Escalation Potential: {risk_level} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})\n"
|
293 |
+
out += "π¨ This indicates how many serious risk factors are present based on your answers to the safety checklist.\n\n"
|
294 |
out += generate_risk_snippet(composite_abuse, top_label, escalation_score, most_common_stage)
|
295 |
out += f"\n\n{stage_text}"
|
296 |
out += darvo_blurb
|