Update README.md
Browse files
README.md
CHANGED
@@ -30,7 +30,7 @@ The results on test set.
|
|
30 |
``` bash
|
31 |
import torch
|
32 |
|
33 |
-
from transformers import
|
34 |
import torch
|
35 |
if torch.cuda.is_available():
|
36 |
device = torch.device("cuda")
|
@@ -42,7 +42,7 @@ else:
|
|
42 |
print('No GPU available, using the CPU instead.')
|
43 |
device = torch.device("cpu")
|
44 |
|
45 |
-
model =
|
46 |
tokenizer = T5Tokenizer.from_pretrained("NlpHUST/t5-en-vi-small")
|
47 |
model.to(device)
|
48 |
|
|
|
30 |
``` bash
|
31 |
import torch
|
32 |
|
33 |
+
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
34 |
import torch
|
35 |
if torch.cuda.is_available():
|
36 |
device = torch.device("cuda")
|
|
|
42 |
print('No GPU available, using the CPU instead.')
|
43 |
device = torch.device("cpu")
|
44 |
|
45 |
+
model = T5ForConditionalGeneration.from_pretrained("NlpHUST/t5-en-vi-small")
|
46 |
tokenizer = T5Tokenizer.from_pretrained("NlpHUST/t5-en-vi-small")
|
47 |
model.to(device)
|
48 |
|