Downloads · 30 days
12
1% of all-time downloads
BlackKakapo/t5-small-grammar-ro-root
t5-small-grammar-ro-root is a machine learning model from BlackKakapo. 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. The card lists the license as apache-2.0.
Downloads · 30 days
12
1% of all-time downloads
All-time downloads
1.1K
Public
Parameters
223M
1.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin892 MB · 50%
From the Hugging Face model README
This model is trained on sentences with words in the root form. To bring the words to a syntactically correct form.
grammar: text
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("BlackKakapo/t5-small-grammar-ro-root")
model = AutoModelForSeq2SeqLM.from_pretrained("BlackKakapo/t5-small-grammar-ro-root")
pip install happytransformer
from happytransformer import TTSettings, HappyTextToText
happy_tt_save = HappyTextToText('T5',r"BlackKakapo/t5-small-grammar-ro")
beam_settings = TTSettings(num_beams=10, min_length=10, max_length=100)
sent = "As dori ca sa corecteze toate greșelile."
prefix = "grammar: "
example = prefix + sent
result = happy_tt_save.generate_text(example, args=beam_settings)
print(result.text)
Aș dori ca să corecteze toate greșelile.