SamanthaStorm commited on
Commit
3529542
·
verified ·
1 Parent(s): a28ef35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -186,10 +186,7 @@ if matched_phrases:
186
  result += f"• {label.replace('_', ' ').title()}: “{phrase_clean}”\n"
187
 
188
  # Always show abuse type if available
189
- if abuse_type:
190
- result += f"\n\n🧠 Likely Abuse Type: {abuse_type}"
191
- result += f"\n🧠 Abuser Profile: {abuser_profile}"
192
- result += f"\n📘 Safety Tip: {advice}"
193
  # THEN immediately follow with this:
194
  if contextual_flags:
195
  result += "\n\n⚠️ You indicated the following:\n" + "\n".join([f"• {flag.replace('_', ' ').title()}" for flag in contextual_flags])
@@ -207,7 +204,8 @@ if abuse_type:
207
  result += f"\n\n🧠 Likely Abuse Type: {abuse_type}"
208
  result += f"\n🧠 Abuser Profile: {abuser_profile}"
209
  result += f"\n📘 Safety Tip: {advice}"
210
- return result
 
211
 
212
  iface = gr.Interface(
213
  fn=analyze_messages,
 
186
  result += f"• {label.replace('_', ' ').title()}: “{phrase_clean}”\n"
187
 
188
  # Always show abuse type if available
189
+
 
 
 
190
  # THEN immediately follow with this:
191
  if contextual_flags:
192
  result += "\n\n⚠️ You indicated the following:\n" + "\n".join([f"• {flag.replace('_', ' ').title()}" for flag in contextual_flags])
 
204
  result += f"\n\n🧠 Likely Abuse Type: {abuse_type}"
205
  result += f"\n🧠 Abuser Profile: {abuser_profile}"
206
  result += f"\n📘 Safety Tip: {advice}"
207
+
208
+ return result
209
 
210
  iface = gr.Interface(
211
  fn=analyze_messages,