Spaces:
Paused
Paused
added gradio app
Browse files
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)
|