BusinessDev commited on
Commit
fc9195f
1 Parent(s): b46f4f3

finalmaybe

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ def answer_question(context, question):
25
  answer_end = torch.argmax(end_scores) + 1
26
 
27
  # Get answer tokens and convert them to string
28
- answer = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])
29
  answer = "".join(answer)
30
 
31
  return answer
 
25
  answer_end = torch.argmax(end_scores) + 1
26
 
27
  # Get answer tokens and convert them to string
28
+ answer = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0][answer_start:answer_end])
29
  answer = "".join(answer)
30
 
31
  return answer