Find answers from a given context using a transformer model.
Question Answering (QA) is a Natural Language Processing (NLP) task where a model extracts answers from a provided text. This approach is widely used in chatbots, virtual assistants, and automated customer support systems.
Hugging Face provides pre-trained transformer models for QA, such as BERT, DistilBERT, and RoBERTa. These models analyze the input question and context and extract the most relevant answer.
In this demo, we use the DistilBERT model (`distilbert-base-cased-distilled-squad`) via Hugging Face’s Inference API to extract answers from user-provided text.
Provide a passage and ask a relevant question.