SamanthaStorm commited on
Commit
207a539
·
verified ·
1 Parent(s): 9deae4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -402,7 +402,7 @@ def analyze_single_message(text, thresholds):
402
  ]
403
 
404
  label_scores = {label: score for label, score in zip(LABELS, scores)}
405
- passed = {label: score for label in threshold_labels if label in label_scores}
406
 
407
  # 🛡️ Prevent obscure language from being chosen unless it crosses a hard threshold
408
  MIN_OBSCURE_SCORE = 0.30
 
402
  ]
403
 
404
  label_scores = {label: score for label, score in zip(LABELS, scores)}
405
+ label = score_to_label(score) if score is not None else "Unknown"
406
 
407
  # 🛡️ Prevent obscure language from being chosen unless it crosses a hard threshold
408
  MIN_OBSCURE_SCORE = 0.30