Downloads · 30 days
13
0% of all-time downloads
addy88/t5-grammar-correction
t5-grammar-correction is a machine learning model from addy88. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Here is how to use this model in PyTorch:
Downloads · 30 days
13
0% of all-time downloads
All-time downloads
15.1K
Public
Repo size
1.8 GB
Likes
2
Public
Click a slice to open those files.
.bin892 MB · 100%
From the Hugging Face model README
Here is how to use this model in PyTorch:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("addy88/t5-grammar-correction")
model = AutoModelForSeq2SeqLM.from_pretrained("addy88/t5-grammar-correction")
input_ids = tokenizer('grammar: This sentences has has bads grammar.', return_tensors='pt').input_ids
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))