SamanthaStorm commited on
Commit
657a2bd
·
verified ·
1 Parent(s): 4f3c7c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -564,6 +564,8 @@ def analyze_single_message(text, thresholds):
564
  top_patterns = sorted(top_patterns, key=lambda x: x[1], reverse=True)
565
  if top_patterns[0][0] != "insults":
566
  top_patterns.insert(0, ("insults", insult_score))
 
 
567
 
568
  # Debug
569
  print(f"Emotional Tone Tag: {tone_tag}")
 
564
  top_patterns = sorted(top_patterns, key=lambda x: x[1], reverse=True)
565
  if top_patterns[0][0] != "insults":
566
  top_patterns.insert(0, ("insults", insult_score))
567
+ if "insults" not in threshold_labels:
568
+ threshold_labels.append("insults")
569
 
570
  # Debug
571
  print(f"Emotional Tone Tag: {tone_tag}")