etchen commited on
Commit
ee8c172
·
verified ·
1 Parent(s): 5484d0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import torch
7
  from transformers import pipeline
8
 
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
- model_repo_id = "openai/whisper-tiny"
11
 
12
  if torch.cuda.is_available():
13
  torch_dtype = torch.float16
@@ -15,7 +15,6 @@ else:
15
  torch_dtype = torch.float32
16
 
17
  pipe = pipeline(task="automatic-speech-recognition", model=model_repo_id, device=device)
18
- pipe.model.generation_config.forced_decoder_ids = pipe.processor.get_decoder_prompt_ids(language="zh", task="transcribe")
19
 
20
  # @spaces.GPU #[uncomment to use ZeroGPU]
21
  def infer(
 
7
  from transformers import pipeline
8
 
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
+ model_repo_id = "emlinking/wav2vec2-large-xls-r-300m-tsm-asr-v6"
11
 
12
  if torch.cuda.is_available():
13
  torch_dtype = torch.float16
 
15
  torch_dtype = torch.float32
16
 
17
  pipe = pipeline(task="automatic-speech-recognition", model=model_repo_id, device=device)
 
18
 
19
  # @spaces.GPU #[uncomment to use ZeroGPU]
20
  def infer(