Question Answering with Hugging Face Transformers
keras.io › examples › nlpJan 13, 2022 · Question answering is a common NLP task with several variants. In some variants, the task is multiple-choice: A list of possible answers are supplied with each question, and the model simply needs to return a probability distribution over the options. A more challenging variant of question answering, which is more applicable to real-life tasks ...
Questions Answering Example · Issue #220 · huggingface ...
github.com › huggingface › transformersJan 23, 2019 · from transformers import DistilBertTokenizer, DistilBertForQuestionAnswering import torch tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased',return_token_type_ids = True) model = DistilBertForQuestionAnswering.from_pretrained('distilbert-base-uncased-distilled-squad') context = "The US has passed the peak on new coronavirus cases, President Donald Trump said and ...