DarwinAnim8or commited on
Commit
9dd47e3
·
1 Parent(s): 246fe06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ model = GPT2LMHeadModel.from_pretrained('DarwinAnim8or/gpt-grug-1.5b', use_auth_
13
  # Define the function that generates text from a prompt
14
  def generate_text(prompt):
15
  input_ids = tokenizer.encode(prompt, return_tensors='pt')
16
- output = model.generate(input_ids, max_length=80, do_sample=True)
17
  text = tokenizer.decode(output[0], skip_special_tokens=True)
18
  return text
19
 
 
13
  # Define the function that generates text from a prompt
14
  def generate_text(prompt):
15
  input_ids = tokenizer.encode(prompt, return_tensors='pt')
16
+ output = model.generate(input_ids, max_new_tokens=80, do_sample=True)
17
  text = tokenizer.decode(output[0], skip_special_tokens=True)
18
  return text
19