immelstorun commited on
Commit
ccd51f0
1 Parent(s): e8f489a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -7,7 +7,6 @@ warnings.filterwarnings("ignore")
7
  # Loading the speechbrain emotion detection model
8
  learner = foreign_class(
9
  source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP",
10
- # savedir="/home/harish3110/SeaWord/emotion/nbs/pretrained_models/CustomEncoderWav2vec2Classifier--8353113631630090076",
11
  pymodule_file="custom_interface.py",
12
  classname="CustomEncoderWav2vec2Classifier"
13
  )
@@ -22,7 +21,7 @@ emotion_dict = {
22
 
23
  def predict_emotion(audio):
24
  out_prob, score, index, text_lab = learner.classify_file(audio.name)
25
- return emotion_dict[text_lab[0]], score
26
 
27
  # Loading gradio interface
28
  inputs = gr.inputs.Audio(label="Input Audio", type="file")
 
7
  # Loading the speechbrain emotion detection model
8
  learner = foreign_class(
9
  source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP",
 
10
  pymodule_file="custom_interface.py",
11
  classname="CustomEncoderWav2vec2Classifier"
12
  )
 
21
 
22
  def predict_emotion(audio):
23
  out_prob, score, index, text_lab = learner.classify_file(audio.name)
24
+ return emotion_dict[text_lab[0]]
25
 
26
  # Loading gradio interface
27
  inputs = gr.inputs.Audio(label="Input Audio", type="file")