Teapack1 commited on
Commit
7b88933
1 Parent(s): 9226479

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- demo = gr.Interface(
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
- demo.launch(debug=True, share=True)
 
 
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)