Downloads · 30 days
10
1% of all-time downloads
recobo/chemical-bert-uncased-squad2
chemical-bert-uncased-squad2 is a question answering model from recobo. Use it when the input is a question plus a passage. It is set up for transformers.
Downloads · 30 days
10
1% of all-time downloads
All-time downloads
1.7K
Public
Repo size
875 MB
Likes
0
Public
Click a slice to open those files.
.bin437 MB · 100%
From the Hugging Face model README
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
model_name = "recobo/chemical-bert-uncased-squad2"
# a) Get predictions
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
'question': 'Why is model conversion important?',
'context': 'The option to convert models between pytorch and transformers gives freedom to the user and let people easily switch between frameworks.'
}
res = nlp(QA_input)
# b) Load model & tokenizer
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)