mskov commited on
Commit
b5b947d
·
1 Parent(s): 6d9a5de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -110,7 +110,7 @@ def classify_toxicity(audio_file, classify_anxiety, emo_class, explitive_selecti
110
  # formatted_classification_output = "\n".join([f"{key}: {value}" for key, value in classification_output.items()])
111
  # label_score_pairs = [(label, score) for label, score in zip(classification_output['labels'], classification_output['scores'])]
112
  label_score_dict = {label: score for label, score in zip(classification_output['labels'], classification_output['scores'])}
113
- k = max(label_score_dict, value=label_score_dict.get)
114
  maxval = label_score_dict[k]
115
  if maxval > tox_score:
116
  if maxval > threshold:
 
110
  # formatted_classification_output = "\n".join([f"{key}: {value}" for key, value in classification_output.items()])
111
  # label_score_pairs = [(label, score) for label, score in zip(classification_output['labels'], classification_output['scores'])]
112
  label_score_dict = {label: score for label, score in zip(classification_output['labels'], classification_output['scores'])}
113
+ k = max(label_score_dict, key=label_score_dict.get)
114
  maxval = label_score_dict[k]
115
  if maxval > tox_score:
116
  if maxval > threshold: