pere commited on
Commit
ecc7149
·
1 Parent(s): 7813820

update test

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -28,12 +28,11 @@ def pipe(file, return_timestamps=False):
28
  asr = pipeline(
29
  task="automatic-speech-recognition",
30
  model=MODEL_NAME,
31
- chunk_length_s=30,
32
  device=device,
33
  token=auth_token,
34
- num_beams=5,
35
  torch_dtype=torch.float16,
36
- model_kwargs={"attn_implementation": "flash_attention_2"} if FLASH_ATTENTION else {"attn_implementation": "sdpa"},
37
  )
38
  asr.model.config.forced_decoder_ids = asr.tokenizer.get_decoder_prompt_ids(
39
  language=lang,
 
28
  asr = pipeline(
29
  task="automatic-speech-recognition",
30
  model=MODEL_NAME,
31
+ chunk_length_s=26,
32
  device=device,
33
  token=auth_token,
 
34
  torch_dtype=torch.float16,
35
+ model_kwargs={"attn_implementation": "flash_attention_2", "num_beams": 5} if FLASH_ATTENTION else {"attn_implementation": "sdpa", "num_beams": 5},
36
  )
37
  asr.model.config.forced_decoder_ids = asr.tokenizer.get_decoder_prompt_ids(
38
  language=lang,