SamanthaStorm commited on
Commit
92394e7
·
verified ·
1 Parent(s): 97be658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -171,10 +171,10 @@ def analyze_messages(input_text, risk_flags):
171
 
172
  result = f"Abuse Risk Score: {abuse_level}% – {abuse_description}\n\n"
173
  if abuse_level >= 15:
174
- result += f"Most Likely Patterns:\n{top_pattern_explanations}\n\n"
175
- result += f"⚠️ Critical Danger Flags Detected: {danger_flag_count} of 3\n"
176
- result += f"Resources: {resources}\n"
177
- result += f"🧠 Sentiment: {sentiment_label.title()} (Confidence: {sentiment_score*100:.2f}%)\n"
178
 
179
  if contextual_flags:
180
  result += "\n\n⚠️ You indicated the following:\n" + "\n".join([f"• {flag.replace('_', ' ').title()}" for flag in contextual_flags])
 
171
 
172
  result = f"Abuse Risk Score: {abuse_level}% – {abuse_description}\n\n"
173
  if abuse_level >= 15:
174
+ result += f"Most Likely Patterns:\n{top_pattern_explanations}\n\n"
175
+ result += f"⚠️ Critical Danger Flags Detected: {danger_flag_count} of 3\n"
176
+ result += f"Resources: {resources}\n"
177
+ result += f"🧠 Sentiment: {sentiment_label.title()} (Confidence: {sentiment_score*100:.2f}%)\n"
178
 
179
  if contextual_flags:
180
  result += "\n\n⚠️ You indicated the following:\n" + "\n".join([f"• {flag.replace('_', ' ').title()}" for flag in contextual_flags])