SamanthaStorm commited on
Commit
dee6092
Β·
verified Β·
1 Parent(s): 87e8754

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -280,11 +280,15 @@ def analyze_composite(msg1, msg2, msg3, *answers_and_none):
280
  if escalation_score is None:
281
  out += "Escalation Potential: Unknown (Checklist not completed)\n"
282
  out += "πŸ” *This section was not completed. Escalation potential is unknown.*\n\n"
 
283
  else:
284
  risk_level = (
285
  "High" if escalation_score >= 16 else
286
  "Moderate" if escalation_score >= 8 else
287
  "Low"
 
 
 
288
  )
289
  out += generate_risk_snippet(composite_abuse, top_label, escalation_score, most_common_stage)
290
  out += f"\n\n{stage_text}"
 
280
  if escalation_score is None:
281
  out += "Escalation Potential: Unknown (Checklist not completed)\n"
282
  out += "πŸ” *This section was not completed. Escalation potential is unknown.*\n\n"
283
+ risk_level = "unknown" # just in case something tries to reference it later
284
  else:
285
  risk_level = (
286
  "High" if escalation_score >= 16 else
287
  "Moderate" if escalation_score >= 8 else
288
  "Low"
289
+ )
290
+ out += f"Escalation Potential: {risk_level} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})\n"
291
+ out += "🚨 This indicates how many serious risk factors are present based on your answers to the safety checklist.\n\n"
292
  )
293
  out += generate_risk_snippet(composite_abuse, top_label, escalation_score, most_common_stage)
294
  out += f"\n\n{stage_text}"