SamanthaStorm commited on
Commit
7ec1961
·
verified ·
1 Parent(s): f0eb38d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -560,7 +560,7 @@ def analyze_single_message(text, thresholds):
560
  short_text = len(tokens) <= 10
561
  insult_score = next((s for l, s in top_patterns if l == "insults"), 0)
562
 
563
- if has_profane and anger_score > 0.75 and short_text and insult_score > 0.1:
564
  print("⚠️ Profanity + Anger Override Triggered")
565
  top_patterns = sorted(top_patterns, key=lambda x: x[1], reverse=True)
566
  if top_patterns[0][0] != "insults":
 
560
  short_text = len(tokens) <= 10
561
  insult_score = next((s for l, s in top_patterns if l == "insults"), 0)
562
 
563
+ if has_profane and anger_score > 0.75 and short_text:
564
  print("⚠️ Profanity + Anger Override Triggered")
565
  top_patterns = sorted(top_patterns, key=lambda x: x[1], reverse=True)
566
  if top_patterns[0][0] != "insults":