fabianzeiher commited on
Commit
96e0fc7
·
1 Parent(s): 9af9e7f

Force models to swedish and transtiption

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,8 +1,8 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
- pipe_fine = pipeline(model="zeihers-mart/whisper-small-swedish-basic")
5
- pipe_raw = pipeline(model="openai/whisper-small")
6
 
7
  def transcribe(audio):
8
  text_sv = pipe_fine(audio)["text"]
 
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
+ pipe_fine = pipeline(model="zeihers-mart/whisper-small-swedish-basic", device_map="auto", language="swedish", task="transcribe")
5
+ pipe_raw = pipeline(model="openai/whisper-small", device_map="auto", language="swedish", task="transcribe")
6
 
7
  def transcribe(audio):
8
  text_sv = pipe_fine(audio)["text"]