mskov commited on
Commit
f8fa917
1 Parent(s): 9d36990

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.name)
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}"