How to get multiple answers from the context using BertForQuestionAnswering
How do I get multiple answers from the text using **BertForQuestionAnswering**, just like for the below question there are two possible answers:

1. a nice puppet
2. a software engineer

**Below is the code snippet for the same:**

```
from transformers import BertTokenizer, BertForQuestionAnswering
import torch

tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = BertForQuestionAnswering.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad')

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet.Jim Henson was a software engineer."
input_ids = tokenizer.encode(question, text)
token_type_ids = [0 if i <= input_ids.index(102) else 1 for i in range(len(input_ids))]
start_scores, end_scores = model(torch.tensor([input_ids]), token_type_ids=torch.tensor([token_type_ids]))

all_tokens = tokenizer.convert_ids_to_tokens(input_ids)
answer = ' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1])
print(answer)

'a software engineer' 
```

Thanks in advance!!
this might help https://github.com/google-research/bert/issues/657<|||||>Thanks @chutaklee  for the quick response, but may I please know whether we can do the same with the existing pretrained BERT model,by changing any parameters anywhere,as I currently do have question-answer pairs and I'm not not training the model, so just wanted to use pre trained to get the answers.

Thanks in advance!!<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
<|||||>@MaheshChandrra Going through the same problem. Did you find any solution ?<|||||>@subigyaup ,No luck yet!! Will do drop the fix if I find anything.