mskov commited on
Commit
3f0c79b
1 Parent(s): d90b7ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -116,7 +116,9 @@ def classify_toxicity(audio_file, classify_anxiety, emo_class, explitive_selecti
116
  # label_score_pairs = [(label, score) for label, score in zip(classification_output['labels'], classification_output['scores'])]
117
  label_score_dict = {label: score for label, score in zip(classification_output['labels'], classification_output['scores'])}
118
  k = max(label_score_dict, key=label_score_dict.get)
 
119
  maxval = label_score_dict[k]
 
120
  if maxval > toxicity_score:
121
  if maxval > threshold:
122
  print("Toxic")
 
116
  # label_score_pairs = [(label, score) for label, score in zip(classification_output['labels'], classification_output['scores'])]
117
  label_score_dict = {label: score for label, score in zip(classification_output['labels'], classification_output['scores'])}
118
  k = max(label_score_dict, key=label_score_dict.get)
119
+ print("k keys: ", k)
120
  maxval = label_score_dict[k]
121
+ print("max value: ", maxval)
122
  if maxval > toxicity_score:
123
  if maxval > threshold:
124
  print("Toxic")