Teapack1 commited on
Commit
0b472d5
1 Parent(s): 34d3b12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
 
4
  model_id = "Teapack1/model_KWS" # update with your model id
5
  pipe = pipeline("audio-classification", model=model_id)
6
 
@@ -19,6 +20,8 @@ def classify_audio(filepath):
19
  demo = gr.Blocks()
20
 
21
  mic_classify = gr.Interface(
 
 
22
  fn=classify_audio,
23
  inputs=gr.Audio(sources="microphone", type="filepath"),
24
  outputs=gr.outputs.Label()
@@ -34,4 +37,5 @@ with demo:
34
  gr.TabbedInterface(
35
  [mic_classify, file_classify],
36
  ["Transcribe Microphone", "Transcribe Audio File"],
37
- )
 
 
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
+
5
  model_id = "Teapack1/model_KWS" # update with your model id
6
  pipe = pipeline("audio-classification", model=model_id)
7
 
 
20
  demo = gr.Blocks()
21
 
22
  mic_classify = gr.Interface(
23
+ title = title,
24
+ description=description,
25
  fn=classify_audio,
26
  inputs=gr.Audio(sources="microphone", type="filepath"),
27
  outputs=gr.outputs.Label()
 
37
  gr.TabbedInterface(
38
  [mic_classify, file_classify],
39
  ["Transcribe Microphone", "Transcribe Audio File"],
40
+ )
41
+ demo.launch(debug=True, share=True)