Downloads · 30 days
14
20% of all-time downloads
Jayveersinh-Raj/guj-grammar-base
guj-grammar-base is a machine learning model from Jayveersinh-Raj. 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.
probably proofread and complete it, then remove this comment. --
Downloads · 30 days
14
20% of all-time downloads
All-time downloads
70
Public
Repo size
9.3 GB
Likes
0
Public
Click a slice to open those files.
.pt4.7 GB · 66%
From the Hugging Face model README
The model is a mt5-base version of Gujarati Grammarly for text correction given a sentence. Only this small version checkpoints are open source.
from transformers import AutoTokenizer
import tensorflow as tf
from transformers import TFAutoModelForSeq2SeqLM
from transformers import create_optimizer
model_checkpoint = "Jayveersinh-Raj/guj-grammar-small"
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
model = TFAutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
sent="બનાશકાઁઠામાઁ તીડે આકરમણ કરયૂ છે."
inputs = tokenizer.encode(sent, return_tensors='tf')
output_ids = model.generate(inputs, max_length=128, num_beams = 4, early_stopping=True)
output = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print("Generated Correction:")
print(output)