pratik-aivantage commited on
Commit
dacdb7e
·
verified ·
1 Parent(s): a52f559

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
31
 
32
  def generate_answer(question):
33
  inputs = tokenizer.encode("Question: " + question, return_tensors="pt")
34
- outputs = model.generate(inputs, max_length=200, num_return_sequences=1, early_stopping=True, do_sample=True)
35
  answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
36
  return answer
37
 
 
31
 
32
  def generate_answer(question):
33
  inputs = tokenizer.encode("Question: " + question, return_tensors="pt")
34
+ outputs = model.generate(inputs, max_length=2000, num_return_sequences=1, do_sample=True)
35
  answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
36
  return answer
37