mskov commited on
Commit
8dbe0c3
1 Parent(s): 73d041b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -58,7 +58,7 @@ def classify_toxicity(audio_file, text_input, classify_anxiety):
58
  #### Emotion classification ####
59
 
60
  emotion_classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
61
- out_prob, score, index, text_lab = learner.classify_file(audio_file.name)
62
 
63
  return toxicity_score, classification_output, emo_dict[text_lab[0]], transcribed_text
64
  # return f"Toxicity Score ({available_models[selected_model]}): {toxicity_score:.4f}"
 
58
  #### Emotion classification ####
59
 
60
  emotion_classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
61
+ out_prob, score, index, text_lab = emotion_classifier.classify_file(audio_file.name)
62
 
63
  return toxicity_score, classification_output, emo_dict[text_lab[0]], transcribed_text
64
  # return f"Toxicity Score ({available_models[selected_model]}): {toxicity_score:.4f}"