Romanian grammar
This model is trained on sentences with words in the root form. To bring the words to a syntactically correct form.
Prefix
grammar: text
How to use
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")
Or
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)
Generate
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)
Output
Aș dori ca să corecteze toate greșelile.
- Downloads last month
- 8
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.