SamanthaStorm commited on
Commit
c4bd45f
Β·
verified Β·
1 Parent(s): ae867ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -481,6 +481,9 @@ def analyze_composite(msg1, date1, msg2, date2, msg3, date3, *answers_and_none):
481
  out += "πŸ“Š This reflects the strength and severity of detected abuse patterns in the message(s).\n\n"
482
 
483
  # Save this line for later use at the
 
 
 
484
  else:
485
  escalation_text = f"🧨 **Escalation Potential: {risk_level} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})**\n"
486
  escalation_text += "This score comes directly from the safety checklist and functions as a standalone escalation risk score.\n"
 
481
  out += "πŸ“Š This reflects the strength and severity of detected abuse patterns in the message(s).\n\n"
482
 
483
  # Save this line for later use at the
484
+ if escalation_score is None:
485
+ escalation_text = "πŸ“‰ Escalation Potential: Unknown (Checklist not completed)\n"
486
+ escalation_text += "⚠️ *This section was not completed. Escalation potential is unknown.*\n"
487
  else:
488
  escalation_text = f"🧨 **Escalation Potential: {risk_level} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})**\n"
489
  escalation_text += "This score comes directly from the safety checklist and functions as a standalone escalation risk score.\n"