Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
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 = " "
|