ekandhi's picture
Create Tut
6032486
raw
history blame contribute delete
325 Bytes
from transformers import pipeline
qa_model = pipeline("question-answering")
question = "Where is the ball?"
context = "The chair is near the table, and the ball is behind the chair."
qa_model(question = question, context = context)
## {'answer': 'behind the chair', 'end': 61, 'score': 0.8110504746437073,
# 'start': 45}