llms / QA_Pipeline.py
nalinaksh's picture
Rename QA_Pipeline to QA_Pipeline.py
23cf0d6
raw
history blame
164 Bytes
from transformers import pipeline
qa = pipeline("question-answering")
def question_answering_pipeline(question, context):
return qa(question, context)["answer"]