upperwal commited on
Commit
46663e2
·
verified ·
1 Parent(s): d70e74b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -191,13 +191,13 @@ def generate_response(transcription):
191
  with torch.no_grad():
192
  output = model.generate(
193
  input_ids,
194
- max_new_tokens=100,
195
- num_return_sequences=1,
196
- temperature=0.1,
197
- top_k=50,
198
- top_p=0.5,
199
- repetition_penalty=1.2,
200
- do_sample=True
201
  )
202
  generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
203
  return find_last_sentence(generated_text)
 
191
  with torch.no_grad():
192
  output = model.generate(
193
  input_ids,
194
+ max_new_tokens=300,
195
+ do_sample=True,
196
+ top_k=5,
197
+ num_beams=1,
198
+ use_cache=False,
199
+ temperature=0.2,
200
+ repetition_penalty=1.1,
201
  )
202
  generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
203
  return find_last_sentence(generated_text)