Tonic commited on
Commit
c0d4e9c
1 Parent(s): 8c24eff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
16
 
17
  def generate_text(prompt, max_new_tokens=400, do_sample=True, top_k=50, top_p=0.95):
18
  inputs = tokenizer(prompt, return_tensors='pt', return_token_type_ids=False)
19
- response = model.generate(**inputs, max_new_tokens, do_sample, top_k, top_p)
20
  return tokenizer.batch_decode(response, skip_special_tokens=True)[0]
21
 
22
 
 
16
 
17
  def generate_text(prompt, max_new_tokens=400, do_sample=True, top_k=50, top_p=0.95):
18
  inputs = tokenizer(prompt, return_tensors='pt', return_token_type_ids=False)
19
+ response = model.generate(**inputs, max_new_tokens=max_new_tokens, do_sample=do_sample, top_k=top_k, top_p=top_p)
20
  return tokenizer.batch_decode(response, skip_special_tokens=True)[0]
21
 
22