Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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}")
|