Update README.md
Browse files
README.md
CHANGED
@@ -18,6 +18,13 @@ from transformers import AutoModelForMaskedLM, AutoTokenizer
|
|
18 |
|
19 |
tokenizer = AutoTokenizer.from_pretrained('HeNLP/LongHeRo')
|
20 |
model = AutoModelForMaskedLM.from_pretrained('HeNLP/LongHeRo')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
```
|
22 |
|
23 |
|
|
|
18 |
|
19 |
tokenizer = AutoTokenizer.from_pretrained('HeNLP/LongHeRo')
|
20 |
model = AutoModelForMaskedLM.from_pretrained('HeNLP/LongHeRo')
|
21 |
+
|
22 |
+
# Tokenization Example:
|
23 |
+
# Encoding and tokenizing
|
24 |
+
encoded_string = tokenizer('שלום לכולם')
|
25 |
+
|
26 |
+
# Decoding
|
27 |
+
decoded_string = tokenizer.decode(encoded_string['input_ids'], skip_special_tokens=True)
|
28 |
```
|
29 |
|
30 |
|