versae commited on
Commit
cff1674
·
verified ·
1 Parent(s): e64ca7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -8,7 +8,8 @@ import spaces
8
  from transformers import pipeline
9
  from huggingface_hub import model_info
10
 
11
- MODEL_NAME = os.environ.get("MODEL_NAME", "NbAiLab/whisper-large-sme")
 
12
  lang = "fi"
13
 
14
  share = (os.environ.get("SHARE", "False")[0].lower() in "ty1") or None
@@ -21,6 +22,7 @@ def pipe(file, return_timestamps=False):
21
  asr = pipeline(
22
  task="automatic-speech-recognition",
23
  model=MODEL_NAME,
 
24
  chunk_length_s=30,
25
  device=device,
26
  token=auth_token,
 
8
  from transformers import pipeline
9
  from huggingface_hub import model_info
10
 
11
+ MODEL_NAME = os.environ.get("MODEL_NAME", "NbAiLab/salmon-whisper-large-smj-lr7e-5")
12
+ MODEL_VERSION = os.environ.get("MODEL_VERSION", None)
13
  lang = "fi"
14
 
15
  share = (os.environ.get("SHARE", "False")[0].lower() in "ty1") or None
 
22
  asr = pipeline(
23
  task="automatic-speech-recognition",
24
  model=MODEL_NAME,
25
+ revision=MODEL_VERSION,
26
  chunk_length_s=30,
27
  device=device,
28
  token=auth_token,