divakaivan commited on
Commit
778eba9
1 Parent(s): b3a0e76

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ pipe = pipeline(model="divakaivan/whisper-small-hi_test")
5
+
6
+ def transcribe(audio):
7
+ print(audio)
8
+ print(type(audio))
9
+ text = pipe(audio)["text"]
10
+ return text
11
+
12
+ iface = gr.Interface(
13
+ fn=transcribe,
14
+ inputs=gr.Audio(type="filepath"),
15
+ outputs="text",
16
+ title="Whisper Small Glaswegian",
17
+ description="Realtime demo for Glaswegian speech recognition using a fine-tuned Whisper small model.",
18
+ )
19
+
20
+ iface.launch()