mskov commited on
Commit
0c2e961
1 Parent(s): b5b947d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -112,7 +112,7 @@ def classify_toxicity(audio_file, classify_anxiety, emo_class, explitive_selecti
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:
117
  print("Toxic")
118
  affirm = positive_affirmations()
@@ -122,7 +122,7 @@ def classify_toxicity(audio_file, classify_anxiety, emo_class, explitive_selecti
122
  affirm = ""
123
  topScore = maxval
124
  else:
125
- if tox_score > threshold:
126
  affirm = positive_affirmations()
127
  topScore = toxicity_score
128
  else:
 
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 > toxicity_score:
116
  if maxval > threshold:
117
  print("Toxic")
118
  affirm = positive_affirmations()
 
122
  affirm = ""
123
  topScore = maxval
124
  else:
125
+ if toxicity_score > threshold:
126
  affirm = positive_affirmations()
127
  topScore = toxicity_score
128
  else: