Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
from transformers import pipeline
|
2 |
import gradio as gr
|
|
|
3 |
|
4 |
|
5 |
model_id = "Teapack1/model_KWS" # update with your model id
|
@@ -15,7 +15,7 @@ def classify_audio(audio):
|
|
15 |
return predictions
|
16 |
|
17 |
|
18 |
-
|
19 |
fn=classify_audio,
|
20 |
inputs=gr.inputs.Audio(source="microphone", type="numpy", label="Record your audio"),
|
21 |
outputs="label",
|
@@ -23,4 +23,4 @@ demo = gr.Interface(
|
|
23 |
description="A simple demo to classify audio using a Hugging Face model."
|
24 |
)
|
25 |
|
26 |
-
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
|
5 |
model_id = "Teapack1/model_KWS" # update with your model id
|
|
|
15 |
return predictions
|
16 |
|
17 |
|
18 |
+
iface = gr.Interface(
|
19 |
fn=classify_audio,
|
20 |
inputs=gr.inputs.Audio(source="microphone", type="numpy", label="Record your audio"),
|
21 |
outputs="label",
|
|
|
23 |
description="A simple demo to classify audio using a Hugging Face model."
|
24 |
)
|
25 |
|
26 |
+
iface.launch(debug=True, share=True)
|