rajpurkar/squad
Viewer • Updated • 98.2k • 146k • 363
How to use minkhantycc/GPT2forQuestionAnswering with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="minkhantycc/GPT2forQuestionAnswering") # Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("minkhantycc/GPT2forQuestionAnswering")
model = AutoModelForQuestionAnswering.from_pretrained("minkhantycc/GPT2forQuestionAnswering")