Distay commited on
Commit
527e17f
·
1 Parent(s): db075c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -1,7 +1,17 @@
 
 
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
1
+
2
+
3
  import gradio as gr
4
 
5
+ from transformers import pipeline
6
+
7
+ p = pipeline(model="Distay/whisper-tiny")
8
+
9
+ def transcribe(audio):
10
+ text = p(audio)["text"]
11
+ return text
12
 
13
+ gr.Interface(
14
+ fn=transcribe,
15
+ inputs=gr.Audio(source="microphone", type="filepath"),
16
+ outputs="text",live=True,auto_submit=True,
17
+ auto_submit_duration=5).launch()