Downloads · 30 days
82
2% of all-time downloads
leslyarun/grammatical-error-correction
grammatical-error-correction is a machine learning model from leslyarun. 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.
Downloads · 30 days
82
2% of all-time downloads
All-time downloads
3.7K
Public
Parameters
223M
1.8 GB on disk
Likes
2
Public
Click a slice to open those files.
.bin892 MB · 50%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("leslyarun/grammatical-error-correction")
model = AutoModelForSeq2SeqLM.from_pretrained("leslyarun/grammatical-error-correction")
text2text_generator = pipeline("text2text-generation", model=model, tokenizer=tokenizer)
output = text2text_generator("grammar: " + sentence)
print(output[0]["generated_text"])