ekandhi commited on
Commit
6032486
1 Parent(s): e02431d

Create Tut

Browse files
Files changed (1) hide show
  1. Tut +9 -0
Tut ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ qa_model = pipeline("question-answering")
4
+
5
+ question = "Where is the ball?"
6
+ context = "The chair is near the table, and the ball is behind the chair."
7
+ qa_model(question = question, context = context)
8
+ ## {'answer': 'behind the chair', 'end': 61, 'score': 0.8110504746437073,
9
+ # 'start': 45}