Update README.md
Browse files
README.md
CHANGED
@@ -20,9 +20,9 @@ We hope that the community especially researchers and professionals engaged in t
|
|
20 |
Here is how to use this model to get the features of a given text in PyTorch:
|
21 |
|
22 |
```python
|
23 |
-
from transformers import BertTokenizer, BertModel, AutoTokenizer,
|
24 |
-
tokenizer = BertTokenizer.from_pretrained('
|
25 |
-
model = BertModel.from_pretrained("vasugoel/K-12BERT") #
|
26 |
text = "Replace me by any text you'd like."
|
27 |
encoded_input = tokenizer(text, return_tensors='pt')
|
28 |
output = model(**encoded_input)
|
|
|
20 |
Here is how to use this model to get the features of a given text in PyTorch:
|
21 |
|
22 |
```python
|
23 |
+
from transformers import BertTokenizer, BertModel, AutoTokenizer, AutoModelForMaskedLM
|
24 |
+
tokenizer = BertTokenizer.from_pretrained('vasugoel/K-12BERT') # AutoTokenizer.from_pretrained('vasugoel/K-12BERT')
|
25 |
+
model = BertModel.from_pretrained("vasugoel/K-12BERT") # AutoModelForMaskedLM.from_pretrained('vasugoel/K-12BERT')
|
26 |
text = "Replace me by any text you'd like."
|
27 |
encoded_input = tokenizer(text, return_tensors='pt')
|
28 |
output = model(**encoded_input)
|