Update README.md
Browse files
README.md
CHANGED
@@ -27,7 +27,8 @@ The model was trained on wiki-corpus for 40 hours using NVIDIA Tesla P100 GPU.
|
|
27 |
|
28 |
### Load model
|
29 |
|
30 |
-
```
|
|
|
31 |
import tensorflow as tf
|
32 |
|
33 |
tokenizer = AutoTokenizer.from_pretrained("DeividasM/gpt2_lithuanian_small")
|
@@ -40,7 +41,8 @@ model.eval()
|
|
40 |
```
|
41 |
## Generate text
|
42 |
|
43 |
-
```
|
|
|
44 |
inputs = tokenizer.encode(text, return_tensors="tf")
|
45 |
|
46 |
|
|
|
27 |
|
28 |
### Load model
|
29 |
|
30 |
+
```
|
31 |
+
from transformers import AutoTokenizer, TFAutoModelWithLMHead
|
32 |
import tensorflow as tf
|
33 |
|
34 |
tokenizer = AutoTokenizer.from_pretrained("DeividasM/gpt2_lithuanian_small")
|
|
|
41 |
```
|
42 |
## Generate text
|
43 |
|
44 |
+
```
|
45 |
+
text = "tekstas "
|
46 |
inputs = tokenizer.encode(text, return_tensors="tf")
|
47 |
|
48 |
|