Downloads · 30 days
17
1% of all-time downloads
KES/caribe-capitalise
caribe-capitalise is a machine learning model from KES. 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 mit.
This model utilises T5-base pre-trained model. It was fine tuned using a custom dataset This model was fine-tuned for capitalisation on text that includes multiple sentences or questions.
Downloads · 30 days
17
1% of all-time downloads
All-time downloads
3K
Public
Repo size
4.5 GB
Likes
2
Public
Click a slice to open those files.
.bin892 MB · 100%
From the Hugging Face model README
This model utilises T5-base pre-trained model. It was fine tuned using a custom dataset This model was fine-tuned for capitalisation on text that includes multiple sentences or questions.
Interested in Caribbean Creole? Checkout the library Caribe for more info and future updates.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("KES/caribe-capitalise")
model = AutoModelForSeq2SeqLM.from_pretrained("KES/caribe-capitalise")
text = "john is a boy. he is 12 years old. his sister's name is Joy."
inputs = tokenizer("text:"+text, truncation=True, return_tensors='pt')
output = model.generate(inputs['input_ids'], num_beams=4, max_length=512, early_stopping=True)
capitalised_text=tokenizer.batch_decode(output, skip_special_tokens=True)
print("".join(capitalised_text)) #Capitalised Output: John is a boy. He is 12 years old. His sister's name is Joy.