FredBonux commited on
Commit
e27d757
·
1 Parent(s): b737b1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -1,3 +1,19 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- gr.load("models/FredBonux/whisper-small-it").launch()
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
+ import gradio as gr
4
+
5
+ pipe = pipeline(model="FredBonux/whisper-small-it") # change to "your-username/the-name-you-picked"
6
+
7
+ def transcribe(audio):
8
+ text = pipe(audio)["text"]
9
+ return text
10
+
11
+ iface = gr.Interface(
12
+ fn=transcribe,
13
+ inputs=gr.Audio(source="microphone", type="filepath"),
14
+ outputs="text",
15
+ title="Whisper Small Italian",
16
+ description="Realtime demo for Hindi speech recognition using a fine-tuned Whisper small model.",
17
+ )
18
 
19
+ iface.launch()