Sahibsingh12 commited on
Commit
1cc716b
1 Parent(s): 03a6d30

files changed

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-1_5", trust_remote_code
16
 
17
  def infer(text):
18
  inputs = tokenizer(f'''question: {text} answer: ''', return_tensors="pt", return_attention_mask=False)
19
- outputs = model.generate(**inputs, max_length=116)
20
  text = tokenizer.batch_decode(outputs)[0]
21
  text = text.split('answer:',1)[1]
22
  return text
 
16
 
17
  def infer(text):
18
  inputs = tokenizer(f'''question: {text} answer: ''', return_tensors="pt", return_attention_mask=False)
19
+ outputs = model.generate(**inputs, max_length=156)
20
  text = tokenizer.batch_decode(outputs)[0]
21
  text = text.split('answer:',1)[1]
22
  return text