Commit
·
a804129
1
Parent(s):
105cfb0
Fix example script (#1)
Browse files- Fix example script (edea128d7e958704057044cbf9025bbce2b671b9)
Co-authored-by: Manuel Romero <mrm8488@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -73,7 +73,7 @@ model = T5ForConditionalGeneration.from_pretrained("grammarly/coedit-xl")
|
|
| 73 |
input_text = 'Fix grammatical errors in this sentence: New kinds of vehicles will be invented with new technology than today.'
|
| 74 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
| 75 |
outputs = model.generate(input_ids, max_length=256)
|
| 76 |
-
edited_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 77 |
```
|
| 78 |
|
| 79 |
|
|
|
|
| 73 |
input_text = 'Fix grammatical errors in this sentence: New kinds of vehicles will be invented with new technology than today.'
|
| 74 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
| 75 |
outputs = model.generate(input_ids, max_length=256)
|
| 76 |
+
edited_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 77 |
```
|
| 78 |
|
| 79 |
|