emre commited on
Commit
f082e5d
1 Parent(s): f212498

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -1,3 +1,17 @@
 
1
  import gradio as gr
2
 
3
- gr.Interface.load("models/emre/whisper-medium-turkish-2").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
  import gradio as gr
3
 
4
+ pipe = pipeline(model="emre/whisper-medium-turkish-2")
5
+ def transcribe(audio):
6
+ text = pipe(audio)["text"]
7
+ return text
8
+
9
+ iface = gr.Interface(
10
+ fn=transcribe,
11
+ inputs=gr.Audio(source="microphone", type="filepath"),
12
+ outputs="text",
13
+ title="Whisper Medium Turkish",
14
+ description="Realtime demo for Turkish speech recognition using a fine-tuned Whisper Medium model.",
15
+ )
16
+
17
+ iface.launch()