From b7a5c852ca7881b03aed72d4215c1b8e9f08ff6d Mon Sep 17 00:00:00 2001 From: Shubhankar Date: Tue, 22 Feb 2022 14:56:52 -0500 Subject: [PATCH] Updates the model API Old API `model = AutoModel.from_pretrained('allenai/scibert_scivocab_uncased')` raises exception therefore updating it to `model = AutoModelWithLMHead.from_pretrained('allenai/scibert_scivocab_uncased')` --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7db0beb..1901631 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ Update! SciBERT models now installable directly within Huggingface's framework u from transformers import * tokenizer = AutoTokenizer.from_pretrained('allenai/scibert_scivocab_uncased') -model = AutoModel.from_pretrained('allenai/scibert_scivocab_uncased') +model = AutoModelWithLMHead.from_pretrained('allenai/scibert_scivocab_uncased') tokenizer = AutoTokenizer.from_pretrained('allenai/scibert_scivocab_cased') -model = AutoModel.from_pretrained('allenai/scibert_scivocab_cased') +model = AutoModelWithLMHead.from_pretrained('allenai/scibert_scivocab_cased') ``` ------