Update README.md
Browse files
README.md
CHANGED
|
@@ -38,8 +38,8 @@ You can use this model directly with a pipeline for masked language modeling:
|
|
| 38 |
|
| 39 |
```python
|
| 40 |
>>> from transformers import pipeline
|
| 41 |
-
>>> unmasker = pipeline('fill-mask', model='nairaxo/
|
| 42 |
-
>>> unmasker("rais wa [MASK] ya tanzania
|
| 43 |
|
| 44 |
|
| 45 |
```
|
|
@@ -48,9 +48,9 @@ Here is how to use this model to get the features of a given text in PyTorch:
|
|
| 48 |
|
| 49 |
```python
|
| 50 |
from transformers import BertTokenizer, BertModel
|
| 51 |
-
tokenizer = BertTokenizer.from_pretrained('nairaxo/
|
| 52 |
-
model = BertModel.from_pretrained("nairaxo/
|
| 53 |
-
text = "
|
| 54 |
encoded_input = tokenizer(text, return_tensors='pt')
|
| 55 |
output = model(**encoded_input)
|
| 56 |
```
|
|
@@ -59,9 +59,9 @@ and in TensorFlow:
|
|
| 59 |
|
| 60 |
```python
|
| 61 |
from transformers import BertTokenizer, TFBertModel
|
| 62 |
-
tokenizer = BertTokenizer.from_pretrained('nairaxo/
|
| 63 |
-
model = TFBertModel.from_pretrained("nairaxo/
|
| 64 |
-
text = "
|
| 65 |
encoded_input = tokenizer(text, return_tensors='tf')
|
| 66 |
output = model(encoded_input)
|
| 67 |
```
|
|
|
|
| 38 |
|
| 39 |
```python
|
| 40 |
>>> from transformers import pipeline
|
| 41 |
+
>>> unmasker = pipeline('fill-mask', model='nairaxo/bantulm')
|
| 42 |
+
>>> unmasker("rais wa [MASK] ya tanzania")
|
| 43 |
|
| 44 |
|
| 45 |
```
|
|
|
|
| 48 |
|
| 49 |
```python
|
| 50 |
from transformers import BertTokenizer, BertModel
|
| 51 |
+
tokenizer = BertTokenizer.from_pretrained('nairaxo/bantulm')
|
| 52 |
+
model = BertModel.from_pretrained("nairaxo/bantulm")
|
| 53 |
+
text = "rais wa jamhuri ya tanzania"
|
| 54 |
encoded_input = tokenizer(text, return_tensors='pt')
|
| 55 |
output = model(**encoded_input)
|
| 56 |
```
|
|
|
|
| 59 |
|
| 60 |
```python
|
| 61 |
from transformers import BertTokenizer, TFBertModel
|
| 62 |
+
tokenizer = BertTokenizer.from_pretrained('nairaxo/bantulm')
|
| 63 |
+
model = TFBertModel.from_pretrained("nairaxo/bantulm")
|
| 64 |
+
text = "rais wa jamhuri ya tanzania"
|
| 65 |
encoded_input = tokenizer(text, return_tensors='tf')
|
| 66 |
output = model(encoded_input)
|
| 67 |
```
|