SamanthaStorm commited on
Commit
bdfc5ee
Β·
verified Β·
1 Parent(s): 6319fa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -273,13 +273,10 @@ def analyze_composite(msg1, msg2, msg3, *answers_and_none):
273
  level = "moderate" if avg_darvo < 0.65 else "high"
274
  darvo_blurb = f"\n\n🎭 **DARVO Score: {avg_darvo}** β†’ This indicates a **{level} likelihood** of narrative reversal (DARVO), where the speaker may be denying, attacking, or reversing blame."
275
 
276
- if none_selected:
277
- out += "Escalation Potential: Unknown (Checklist not completed)\n"
278
- out += "πŸ” *This section was not completed. Escalation potential is unknown.*\n\n"
279
- else:
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"
@@ -288,9 +285,6 @@ def analyze_composite(msg1, msg2, msg3, *answers_and_none):
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
 
273
  level = "moderate" if avg_darvo < 0.65 else "high"
274
  darvo_blurb = f"\n\n🎭 **DARVO Score: {avg_darvo}** β†’ This indicates a **{level} likelihood** of narrative reversal (DARVO), where the speaker may be denying, attacking, or reversing blame."
275
 
276
+ out = f"Abuse Intensity: {composite_abuse}%\n"
277
+ out += "πŸ“Š This reflects the strength and severity of detected abuse patterns in the message(s).\n\n"
278
+ out += f"Escalation Potential: {risk_level} ({escalation_score}/{sum(w for _, w in ESCALATION_QUESTIONS)})\n"
279
+ out += "🚨 This indicates how many serious risk factors are present based on your answers to the safety checklist.\n\n"
 
 
 
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"
 
285
  "High" if escalation_score >= 16 else
286
  "Moderate" if escalation_score >= 8 else
287
  "Low"
 
 
 
288
  out += generate_risk_snippet(composite_abuse, top_label, escalation_score, most_common_stage)
289
  out += f"\n\n{stage_text}"
290
  out += darvo_blurb