harveysamson commited on
Commit
058508d
·
1 Parent(s): c57c6d6

add additional information

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -29,8 +29,13 @@ def inference(path):
29
  outputs = {config.id2label[i]: float(round(score,2)) for i, score in enumerate(scores)}
30
  return outputs
31
 
32
- examples = ['data/test_audio.wav', 'data/test_audio_2.wav']
33
  inputs = gr.inputs.Audio(label="Input Audio", type="filepath", source="microphone")
34
  outputs = gr.outputs.Label(type="confidences", label = "Output Scores")
35
- iface = gr.Interface(inference, inputs, outputs=["label"], examples=examples)
 
 
 
 
 
 
36
  iface.launch(debug=True)
 
29
  outputs = {config.id2label[i]: float(round(score,2)) for i, score in enumerate(scores)}
30
  return outputs
31
 
 
32
  inputs = gr.inputs.Audio(label="Input Audio", type="filepath", source="microphone")
33
  outputs = gr.outputs.Label(type="confidences", label = "Output Scores")
34
+ title = "Wav2Vec2 Speech Emotion Recognition"
35
+ description = "This is a demo of the Wav2Vec2 Speech Emotion Recognition model. Record an audio clip and the top emotions predicted will be displayed."
36
+ examples = ['data/test_audio.wav', 'data/test_audio_2.wav']
37
+ article = "<a href = 'https://github.com/m3hrdadfi/soxan'> Wav2Vec2 Speech Classification Github Repository"
38
+
39
+
40
+ iface = gr.Interface(inference, inputs, outputs, title=title, description=description, article=article, theme="peach", examples=examples)
41
  iface.launch(debug=True)