awitpao commited on
Commit
208dc60
1 Parent(s): e58d1b2

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+ import numpy
4
+
5
+ pipe = pipeline(task="audio-classification", model="Rajaram1996/Hubert_emotion")
6
+
7
+ gr.Interface.from_pipeline(pipe,
8
+ title="Audio Emotion Classification",
9
+ description="It will predict the mix of emotions present in the audio file",
10
+ inputs = gr.inputs.Audio(source="upload", type="numpy"),
11
+ outputs = gr.outputs.Label(num_top_classes=5),
12
+ allow_flagging="never"
13
+ ).launch(inbrowser=True)
14
+