Back to all models
text-generation mask_token:
Query this model
🔥 This model is currently loaded and running on the Inference API. ⚠️ This model could not be loaded by the inference API. ⚠️ This model can be loaded on the Inference API on-demand.
JSON Output
API endpoint  

⚡️ Upgrade your account to access the Inference API

Share Copied link to clipboard

Monthly model downloads

adalbertojunior/PTT5-SMALL-SUM adalbertojunior/PTT5-SMALL-SUM
32 downloads
last 30 days

pytorch

tf

Contributed by

adalbertojunior Adalberto Ferreira Barbosa Junior
1 model

How to use this model directly from the 🤗/transformers library:

			
Copy to clipboard
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("adalbertojunior/PTT5-SMALL-SUM") model = AutoModelForSeq2SeqLM.from_pretrained("adalbertojunior/PTT5-SMALL-SUM")

PTT5-SMALL-SUM

Model description

This model was trained to summarize texts in portuguese

based on unicamp-dl/ptt5-small-portuguese-vocab

How to use

from transformers import T5Tokenizer, T5ForConditionalGeneration

tokenizer = T5Tokenizer.from_pretrained('adalbertojunior/PTT5-SMALL-SUM')

t5 = T5ForConditionalGeneration.from_pretrained('adalbertojunior/PTT5-SMALL-SUM')

text="Esse é um exemplo de sumarização."

input_ids = tokenizer.encode(text, return_tensors="pt", add_special_tokens=True)

generated_ids = t5.generate(
        input_ids=input_ids,
        num_beams=1,
        max_length=40,
        #repetition_penalty=2.5
    ).squeeze()

predicted_span = tokenizer.decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=True)