mskov commited on
Commit
6cafddf
·
1 Parent(s): 3e73b5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -98,9 +98,11 @@ def classify_toxicity(audio_file, selected_sounds, slider):
98
  print("matching label score type is ", type(matching_label_score))
99
 
100
  highest_score = max(matching_label_score, key=matching_label_score.get)
 
101
 
102
- if highest_score is not None and highest_score > threshold:
103
  exceeding_threshold.append((label, score))
 
104
  affirm = "Threshold Exceeded"
105
  else:
106
  affirm = " "
 
98
  print("matching label score type is ", type(matching_label_score))
99
 
100
  highest_score = max(matching_label_score, key=matching_label_score.get)
101
+ highest_float = float(highest_score)
102
 
103
+ if highest_score is not None and highest_float > threshold:
104
  exceeding_threshold.append((label, score))
105
+ print(exceeding_threshold)
106
  affirm = "Threshold Exceeded"
107
  else:
108
  affirm = " "