Update README.md
Browse files
README.md
CHANGED
|
@@ -44,8 +44,8 @@ This model was obtained by `instruction-tuning` the corresponding `ClueAI/Prompt
|
|
| 44 |
## Usage
|
| 45 |
```python
|
| 46 |
from transformers import AutoTokenizer, T5ForConditionalGeneration
|
| 47 |
-
tokenizer = AutoTokenizer.from_pretrained("CodeTed/
|
| 48 |
-
model = T5ForConditionalGeneration.from_pretrained("CodeTed/
|
| 49 |
input_text = '糾正句子裡的錯字: 為了降低少子化,政府可以堆動獎勵生育的政策。'
|
| 50 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
| 51 |
outputs = model.generate(input_ids, max_length=256)
|
|
|
|
| 44 |
## Usage
|
| 45 |
```python
|
| 46 |
from transformers import AutoTokenizer, T5ForConditionalGeneration
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained("CodeTed/Chinese_Spelling_Correction_T5")
|
| 48 |
+
model = T5ForConditionalGeneration.from_pretrained("CodeTed/Chinese_Spelling_Correction_T5")
|
| 49 |
input_text = '糾正句子裡的錯字: 為了降低少子化,政府可以堆動獎勵生育的政策。'
|
| 50 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
| 51 |
outputs = model.generate(input_ids, max_length=256)
|