Views
No views yet
1from transformers import pipeline
2qa_pipeline = pipeline(
3 "question-answering",
4 model = "ZTamas/hubert-qa-milqa-impossible",
5 tokenizer = "ZTamas/hubert-qa-milqa-impossible",
6 device = 0, #GPU selection, -1 on CPU
7 handle_impossible_answer = True,
8 max_answer_len = 50
9 )
10
11predictions = qa_pipeline({
12 'context': context,
13 'question': question
14})
15
16print(predictions)
17