huseinzol05
commited on
Commit
•
0254fae
1
Parent(s):
b870a17
fix readme
Browse files
README.md
CHANGED
@@ -35,8 +35,8 @@ You can use this model by installing `torch` or `tensorflow` and Huggingface lib
|
|
35 |
```python
|
36 |
from transformers import T5Tokenizer, T5Model
|
37 |
|
38 |
-
model = T5Model.from_pretrained('malay-huggingface/t5-
|
39 |
-
tokenizer = T5Tokenizer.from_pretrained('malay-huggingface/t5-
|
40 |
```
|
41 |
|
42 |
## Example using T5ForConditionalGeneration
|
@@ -44,8 +44,8 @@ tokenizer = T5Tokenizer.from_pretrained('malay-huggingface/t5-small-bahasa-cased
|
|
44 |
```python
|
45 |
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
46 |
|
47 |
-
tokenizer = T5Tokenizer.from_pretrained('malay-huggingface/t5-
|
48 |
-
model = T5ForConditionalGeneration.from_pretrained('malay-huggingface/t5-
|
49 |
input_ids = tokenizer.encode('soalan: siapakah perdana menteri malaysia?', return_tensors = 'pt')
|
50 |
outputs = model.generate(input_ids)
|
51 |
print(tokenizer.decode(outputs[0]))
|
|
|
35 |
```python
|
36 |
from transformers import T5Tokenizer, T5Model
|
37 |
|
38 |
+
model = T5Model.from_pretrained('malay-huggingface/t5-super-tiny-bahasa-cased')
|
39 |
+
tokenizer = T5Tokenizer.from_pretrained('malay-huggingface/t5-super-tiny-bahasa-cased')
|
40 |
```
|
41 |
|
42 |
## Example using T5ForConditionalGeneration
|
|
|
44 |
```python
|
45 |
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
46 |
|
47 |
+
tokenizer = T5Tokenizer.from_pretrained('malay-huggingface/t5-super-tiny-bahasa-cased')
|
48 |
+
model = T5ForConditionalGeneration.from_pretrained('malay-huggingface/t5-super-tiny-bahasa-cased')
|
49 |
input_ids = tokenizer.encode('soalan: siapakah perdana menteri malaysia?', return_tensors = 'pt')
|
50 |
outputs = model.generate(input_ids)
|
51 |
print(tokenizer.decode(outputs[0]))
|