Downloads · 30 days
16
23% of all-time downloads
bwlw3127/clickbait-bart-dailymail
clickbait-bart-dailymail is a summarization model from bwlw3127. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as mit.
This model fine-tunes facebook/bart-base to generate clickbait-style headlines from DailyMail articles. It takes an article as input and produces a short, attention-grabbing headline.
Downloads · 30 days
16
23% of all-time downloads
All-time downloads
70
Public
Parameters
139M
558 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors558 MB · 99%
From the Hugging Face model README
bwlw3127/clickbait-bart-dailymailThis model fine-tunes facebook/bart-base to generate clickbait-style headlines from DailyMail articles.
It takes an article as input and produces a short, attention-grabbing headline.
This is a sequence-to-sequence model trained with the 🤗 Transformers library. It was adapted from facebook/bart-base and fine-tuned on scraped DailyMail article/headline pairs.
The goal is to demonstrate how large language models can be steered toward stylistic objectives such as “clickbait” headline generation.
facebook/bart-basefrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "bwlw3127/clickbait-bart-dailymail"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
article = "Scientists have discovered a new exoplanet twice the size of Earth..."
inputs = tokenizer("generate clickbait headline: " + article,
return_tensors="pt", truncation=True, max_length=512)
outputs = model.generate(**inputs, max_length=24, num_beams=4, early_stopping=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))