from transformers import pipeline
question_answerer = pipeline(task="question-answering")
preds = question_answerer(
     question="What is the name of the repository?",
     context="The name of the repository is huggingface/transformers",
 )
print(
     f"score: {round(preds['score'], 4)}, start: {preds['start']}, end: {preds['end']}, answer: {preds['answer']}"
 )
score: 0.9327, start: 30, end: 54, answer: huggingface/transformers