nikunjcepatel commited on
Commit
ba7f876
·
verified ·
1 Parent(s): 509ba0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ model = AutoModelForCausalLM.from_pretrained(model_name)
18
  # Define inference function
19
  def generate_text(input_text):
20
  inputs = tokenizer(input_text, return_tensors="pt")
21
- outputs = model.generate(inputs["input_ids"], max_length=50, num_return_sequences=1)
22
  response = tokenizer.decode(outputs[0], skip_special_tokens=True)
23
  return response
24
 
 
18
  # Define inference function
19
  def generate_text(input_text):
20
  inputs = tokenizer(input_text, return_tensors="pt")
21
+ outputs = model.generate(inputs["input_ids"], max_length=256, num_return_sequences=1)
22
  response = tokenizer.decode(outputs[0], skip_special_tokens=True)
23
  return response
24