Downloads · 30 days
13
33% of all-time downloads
sjasmeet/pegsus-text-summarization
pegsus-text-summarization is a machine learning model from sjasmeet. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
13
33% of all-time downloads
All-time downloads
39
Public
Repo size
4.6 GB
Likes
0
Public
Click a slice to open those files.
.bin2.3 GB · 100%
From the Hugging Face model README
Model Name: pegsus-text-summarization
This model is a fine-tuned version of the Pegasus model, specifically adapted for the task of text summarization. It is trained on the SAMSum dataset, which is designed for summarizing conversations.
This model can be used to generate concise summaries of input text, particularly for conversational text or dialogue-based inputs.
You can use this model with the Hugging Face transformers library. Below is an example code snippet:
from transformers import PegasusForConditionalGeneration, PegasusTokenizer
# Load the pre-trained model and tokenizer
model_name = "ailm/pegsus-text-summarization"
model = PegasusForConditionalGeneration.from_pretrained(model_name)
tokenizer = PegasusTokenizer.from_pretrained(model_name)
# Define the input text
text = "Your input text here"
# Tokenize the input text
tokens = tokenizer(text, truncation=True, padding="longest", return_tensors="pt")
# Generate the summary
summary = model.generate(**tokens)
# Decode and print the summary
print(tokenizer.decode(summary[0], skip_special_tokens=True))