SamanthaStorm commited on
Commit
068f7ad
·
verified ·
1 Parent(s): 7a353f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -112,7 +112,10 @@ def analyze_messages(input_text, risk_flags):
112
  else:
113
  resources = "For more information on abuse patterns, consider reaching out to support groups or professional counselors."
114
 
115
- scored_patterns = [(label, score) for label, score in zip(PATTERN_LABELS, scores[:15])]
 
 
 
116
  top_patterns = sorted(scored_patterns, key=lambda x: x[1], reverse=True)[:2]
117
 
118
  top_pattern_explanations = "\n".join([
 
112
  else:
113
  resources = "For more information on abuse patterns, consider reaching out to support groups or professional counselors."
114
 
115
+ scored_patterns = [
116
+ (label, score) for label, score in zip(PATTERN_LABELS, scores[:15])
117
+ if label != "non_abusive"
118
+ ]
119
  top_patterns = sorted(scored_patterns, key=lambda x: x[1], reverse=True)[:2]
120
 
121
  top_pattern_explanations = "\n".join([