immelstorun commited on
Commit
683fb7b
·
1 Parent(s): d8755a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,11 +22,11 @@ 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]]
26
 
27
  # Loading gradio interface
28
  inputs = gr.inputs.Audio(label="Input Audio", type="file")
29
  outputs = "text"
30
- title = "Emotion Detection"
31
  description = "Gradio demo for Emotion Detection. To use it, simply upload your audio, or click one of the examples to load them. Read more at the links below."
32
  gr.Interface(predict_emotion, inputs, outputs, title=title, description=description).launch()
 
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")
29
  outputs = "text"
30
+ title = "Machine Learning Emotion Detection"
31
  description = "Gradio demo for Emotion Detection. To use it, simply upload your audio, or click one of the examples to load them. Read more at the links below."
32
  gr.Interface(predict_emotion, inputs, outputs, title=title, description=description).launch()