stukenov commited on
Commit
b9cb7dc
·
verified ·
1 Parent(s): 4e2a94a

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -107,7 +107,7 @@ def transcribe(audio, model_name):
107
  mel = mel.to(device)
108
 
109
  with torch.no_grad():
110
- tokens = asr.generate(mel, max_new_tokens=100, eos_token_id=0)
111
 
112
  asr.to("cpu")
113
  text = tokenizer.decode(tokens, skip_special_tokens=True).strip()
 
107
  mel = mel.to(device)
108
 
109
  with torch.no_grad():
110
+ tokens = asr.generate(mel, max_new_tokens=100, eos_token_id=0, repetition_penalty=1.5)
111
 
112
  asr.to("cpu")
113
  text = tokenizer.decode(tokens, skip_special_tokens=True).strip()