KhantKyaw commited on
Commit
f34399d
·
verified ·
1 Parent(s): de7ea03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -22,7 +22,7 @@ def generate_response(input_text):
22
  pad_token_id=tokenizer.eos_token_id,
23
  )
24
 
25
- response_with_prefix = tokenizer.decode(output_sequences[:, input_ids.shape[-1]:][0], skip_special_tokens=True)
26
  response_start_idx = response_with_prefix.find("answer: ")
27
  if response_start_idx != -1:
28
 
 
22
  pad_token_id=tokenizer.eos_token_id,
23
  )
24
 
25
+ response_with_prefix = tokenizer.decode(output_sequences[0], skip_special_tokens=True)
26
  response_start_idx = response_with_prefix.find("answer: ")
27
  if response_start_idx != -1:
28