Commit
•
c90f060
1
Parent(s):
2bf41f1
Fix example script (#1)
Browse files- Fix example script (2f4b5e54f12ae79ba382e9e30a58ffab39571130)
Co-authored-by: Manuel Romero <mrm8488@users.noreply.huggingface.co>
README.md
CHANGED
@@ -76,7 +76,7 @@ model = T5ForConditionalGeneration.from_pretrained("grammarly/coedit-xl-composit
|
|
76 |
input_text = 'Fix grammatical errors in this sentence and make it simpler: New kinds of vehicles will be invented with new technology than today.'
|
77 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
78 |
outputs = model.generate(input_ids, max_length=256)
|
79 |
-
edited_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
80 |
```
|
81 |
|
82 |
|
|
|
76 |
input_text = 'Fix grammatical errors in this sentence and make it simpler: New kinds of vehicles will be invented with new technology than today.'
|
77 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
78 |
outputs = model.generate(input_ids, max_length=256)
|
79 |
+
edited_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
80 |
```
|
81 |
|
82 |
|