SamanthaStorm commited on
Commit
a5b8be6
·
verified ·
1 Parent(s): 68c555d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -607,6 +607,7 @@ def analyze_composite(msg1, date1, msg2, date2, msg3, date3, *answers_and_none):
607
  if escalation_score is None:
608
  escalation_text = "📉 Escalation Potential: Unknown (Checklist not completed)\n"
609
  escalation_text += "⚠️ *This section was not completed. Escalation potential is unknown.*\n"
 
610
  else:
611
  escalation_text = f"🧨 **Escalation Potential: {risk_level} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})**\n"
612
  escalation_text += "This score comes directly from the safety checklist and functions as a standalone escalation risk score.\n"
 
607
  if escalation_score is None:
608
  escalation_text = "📉 Escalation Potential: Unknown (Checklist not completed)\n"
609
  escalation_text += "⚠️ *This section was not completed. Escalation potential is unknown.*\n"
610
+ hybrid_score = 0 # ✅ fallback so it's defined for generate_risk_snippet
611
  else:
612
  escalation_text = f"🧨 **Escalation Potential: {risk_level} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})**\n"
613
  escalation_text += "This score comes directly from the safety checklist and functions as a standalone escalation risk score.\n"