ecarbo commited on
Commit
2bd5454
1 Parent(s): 8d7cc31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ model = AutoModelForCausalLM.from_pretrained("gpt2")
8
  def text_generation(input_text, seed):
9
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids
10
  torch.manual_seed(seed) # Max value: 18446744073709551615
11
- outputs = model.generate(input_ids, do_sample=True, max_length=50)
12
  generated_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)
13
  return generated_text
14
 
 
8
  def text_generation(input_text, seed):
9
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids
10
  torch.manual_seed(seed) # Max value: 18446744073709551615
11
+ outputs = model.generate(input_ids, do_sample=True, max_length=100)
12
  generated_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)
13
  return generated_text
14