T5-Base Fine-tuned for Grammar Correction
This is a fine-tuned T5-base model for grammar correction tasks.
Usage
from transformers import T5ForConditionalGeneration, T5Tokenizer
model = T5ForConditionalGeneration.from_pretrained("MdSourav76046/t5-base-grammar-correction")
tokenizer = T5Tokenizer.from_pretrained("MdSourav76046/t5-base-grammar-correction")
# Example usage
input_text = "correct: The studnet are studing hard for there exams"
inputs = tokenizer(input_text, return_tensors="pt", max_length=96, truncation=True)
outputs = model.generate(**inputs, max_length=128, num_beams=3, early_stopping=True)
corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(corrected_text)
- Downloads last month
- 77
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
2
Ask for provider support