Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ def classify_toxicity(audio_file, text_input, classify_anxiety):
|
|
76 |
#### Emotion classification ####
|
77 |
|
78 |
emotion_classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
|
79 |
-
out_prob, score, index, text_lab = emotion_classifier.classify_file(audio_file
|
80 |
|
81 |
return toxicity_score, classification_output, emo_dict[text_lab[0]], transcribed_text
|
82 |
# return f"Toxicity Score ({available_models[selected_model]}): {toxicity_score:.4f}"
|
|
|
76 |
#### Emotion classification ####
|
77 |
|
78 |
emotion_classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
|
79 |
+
out_prob, score, index, text_lab = emotion_classifier.classify_file(audio_file)
|
80 |
|
81 |
return toxicity_score, classification_output, emo_dict[text_lab[0]], transcribed_text
|
82 |
# return f"Toxicity Score ({available_models[selected_model]}): {toxicity_score:.4f}"
|