pytorch electra question-answering transformers
.gitattributes README.md config.json pytorch_model.bin special_tokens_map.json tokenizer_config.json vocab.txt
# Electra base model for QA (SQuAD 2.0)

This model uses [electra-base](https://huggingface.co/google/electra-base-discriminator).

## Usage and Performance
```python
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline

# Load model & tokenizer
electra_model = AutoModelForQuestionAnswering.from_pretrained('navteca/electra-base-squad2')
electra_tokenizer = AutoTokenizer.from_pretrained('navteca/electra-base-squad2')

# Get predictions
nlp = pipeline('question-answering', model=electra_model, tokenizer=electra_tokenizer)

result = nlp({
    'question': 'How many people live in Berlin?',
    'context': 'Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.'
})

print(result)
```
