Esml commited on
Commit
5908601
1 Parent(s): 37c21ff

add some explanation to function

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ def main_note(filepath):
8
  classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
9
  # out_prob, score, index, text_lab = classifier.classify_file("speechbrain/emotion-recognition-wav2vec2-IEMOCAP/anger.wav")
10
  out_prob, score, index, text_lab = classifier.classify_file(filepath)
11
- return text_lab
12
 
13
 
14
  demo = gr.Interface(
 
8
  classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
9
  # out_prob, score, index, text_lab = classifier.classify_file("speechbrain/emotion-recognition-wav2vec2-IEMOCAP/anger.wav")
10
  out_prob, score, index, text_lab = classifier.classify_file(filepath)
11
+ return f"classifer predicts this wave as {text_lab[0]} ; also out_prob is {out_prob}"
12
 
13
 
14
  demo = gr.Interface(