martenb commited on
Commit
4f8422e
·
1 Parent(s): 421e18c

Updated app at mån 4 dec 2023 08:39:13 CET

Browse files
Files changed (1) hide show
  1. app.py +1 -18
app.py CHANGED
@@ -1,20 +1,3 @@
1
- from transformers import pipeline
2
  import gradio as gr
3
 
4
- pipe = pipeline("automatic-speech-recognition", model="GroupSix/whisper-small-sv")
5
-
6
-
7
- def transcribe(audio):
8
- text = pipe(audio)["text"]
9
- return text
10
-
11
-
12
- iface = gr.Interface(
13
- fn=transcribe,
14
- inputs=gr.Audio(), # Removed the 'source' and 'type' arguments
15
- outputs="text",
16
- title="Whisper Small Swedish",
17
- description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
18
- )
19
-
20
- iface.launch()
 
 
1
  import gradio as gr
2
 
3
+ gr.load("models/GroupSix/whisper-small-sv").launch()