Gyaneshere commited on
Commit
9e0ad5a
·
verified ·
1 Parent(s): f50442e

added gradio app

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def classify_audio(filepath):
4
+ preds = pipe(filepath)
5
+ outputs = {}
6
+ for p in preds:
7
+ outputs[p["label"]] = p["score"]
8
+ return outputs
9
+
10
+ demo = gr.Interface(
11
+ fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=gr.Label()
12
+ )
13
+ demo.launch(debug=True)