SamanthaStorm commited on
Commit
46b4f38
·
verified ·
1 Parent(s): 92611e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -216,11 +216,11 @@ def generate_risk_snippet(abuse_score, top_label, escalation_score, stage):
216
  base += "There are signs of emotional pressure or indirect control that may escalate if repeated.\n"
217
  else:
218
  base += "The message does not strongly indicate abuse, but it's important to monitor for patterns.\n"
219
-
220
  base += f"\n💡 *Why this might be flagged:*\n{explanation}\n"
221
  base += f"\nDetected Pattern: **{pattern_label} ({pattern_score})**\n"
222
  base += "🧠 You can review the pattern in context. This tool highlights possible dynamics—not judgments."
223
-
224
  def compute_abuse_score(matched_scores, sentiment):
225
  if not matched_scores:
226
  return 0
 
216
  base += "There are signs of emotional pressure or indirect control that may escalate if repeated.\n"
217
  else:
218
  base += "The message does not strongly indicate abuse, but it's important to monitor for patterns.\n"
219
+
220
  base += f"\n💡 *Why this might be flagged:*\n{explanation}\n"
221
  base += f"\nDetected Pattern: **{pattern_label} ({pattern_score})**\n"
222
  base += "🧠 You can review the pattern in context. This tool highlights possible dynamics—not judgments."
223
+ return base
224
  def compute_abuse_score(matched_scores, sentiment):
225
  if not matched_scores:
226
  return 0