Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,20 +102,9 @@ def classify_toxicity(audio_file, selected_sounds, slider):
|
|
| 102 |
affirm = "Threshold Exceeded"
|
| 103 |
else:
|
| 104 |
affirm = ""
|
| 105 |
-
|
| 106 |
-
'''
|
| 107 |
-
print(score)
|
| 108 |
-
if score > threshold:
|
| 109 |
-
print(f"Threshold exceeded for class '{selected_class_name}': Score = {score:.4f}")
|
| 110 |
-
affirm = f"Threshold exceeded for class '{selected_class_name}': Score = {score:.4f}"
|
| 111 |
-
else:
|
| 112 |
-
print("under threshold")
|
| 113 |
-
affirm = ""
|
| 114 |
-
'''
|
| 115 |
-
miso_label_data= {class_name: score for class_name, score in zip(class_names, scores)}
|
| 116 |
# miso_label_dict = {label: score for label, score in classify_anxiety[0].items()}
|
| 117 |
|
| 118 |
-
return
|
| 119 |
|
| 120 |
with gr.Blocks() as iface:
|
| 121 |
with gr.Column():
|
|
|
|
| 102 |
affirm = "Threshold Exceeded"
|
| 103 |
else:
|
| 104 |
affirm = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
# miso_label_dict = {label: score for label, score in classify_anxiety[0].items()}
|
| 106 |
|
| 107 |
+
return class_score_dict, affirm
|
| 108 |
|
| 109 |
with gr.Blocks() as iface:
|
| 110 |
with gr.Column():
|