Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,14 +96,14 @@ def classify_toxicity(audio_file, selected_sounds, slider):
|
|
96 |
score = class_score_dict[selected_class_name]
|
97 |
matching_label_score[selected_class_name] = score
|
98 |
print("matching label score type is ", type(matching_label_score))
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
|
108 |
# miso_label_dict = {label: score for label, score in classify_anxiety[0].items()}
|
109 |
|
|
|
96 |
score = class_score_dict[selected_class_name]
|
97 |
matching_label_score[selected_class_name] = score
|
98 |
print("matching label score type is ", type(matching_label_score))
|
99 |
+
|
100 |
+
highest_score = max(matching_label_scores, key=matching_label_scores.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 = " "
|
107 |
|
108 |
# miso_label_dict = {label: score for label, score in classify_anxiety[0].items()}
|
109 |
|