nalinaksh commited on
Commit
b7e50c4
·
1 Parent(s): 9ce2472

Create QA_Pipeline

Browse files
Files changed (1) hide show
  1. QA_Pipeline +6 -0
QA_Pipeline ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ qa = pipeline("question-answering")
4
+
5
+ def question_answering_pipeline(question, context):
6
+ return qa(question, context)["answer"]