Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def pipe(file, return_timestamps=False,lang="nn"):
|
|
36 |
device=device,
|
37 |
token=auth_token,
|
38 |
torch_dtype=torch.float16,
|
39 |
-
model_kwargs={"attn_implementation": "flash_attention_2", "num_beams": 5} if FLASH_ATTENTION else {"attn_implementation": "sdpa", "num_beams": 5},
|
40 |
)
|
41 |
asr.model.config.forced_decoder_ids = asr.tokenizer.get_decoder_prompt_ids(
|
42 |
language=lang,
|
|
|
36 |
device=device,
|
37 |
token=auth_token,
|
38 |
torch_dtype=torch.float16,
|
39 |
+
model_kwargs={"attn_implementation": "flash_attention_2", "num_beams": 5, "language": "nn"} if FLASH_ATTENTION else {"attn_implementation": "sdpa", "num_beams": 5},
|
40 |
)
|
41 |
asr.model.config.forced_decoder_ids = asr.tokenizer.get_decoder_prompt_ids(
|
42 |
language=lang,
|