Downloads · 30 days
14
1% of all-time downloads
aicryptogroup/distill-xlm-mrc
distill-xlm-mrc is a question answering model from aicryptogroup. Use it when the input is a question plus a passage. It is set up for transformers.
from transformers import pipeline modelcheckpoint = "aicryptogroup/distill-xlm-mrc" nlp = pipeline('question-answering', model=modelcheckpoint, tokenizer=modelcheckpoint) QAinput = { 'question': "what is the capital o…
Downloads · 30 days
14
1% of all-time downloads
All-time downloads
1.5K
Public
Repo size
325 MB
Likes
0
Public
Click a slice to open those files.
.bin162 MB · 98%
From the Hugging Face model README
from transformers import pipeline
model_checkpoint = "aicryptogroup/distill-xlm-mrc"
nlp = pipeline('question-answering', model=model_checkpoint,
tokenizer=model_checkpoint)
QA_input = {
'question': "what is the capital of Vietnam",
'context': "Keeping an ageless charm through centuries, Hanoi - the capital of Vietnam is famous not only for the Old Quarter with narrow and crowded streets but also for the nostalgic feeling that it brings. While Saigon is a young and modern city, the ancient Hanoi is still a true beholder of history."
}
res = nlp(QA_input)
print('pipeline: {}'.format(res))