| --- |
| library_name: transformers |
| tags: |
| - clickbait |
| - headline-generation |
| - summarization |
| - seq2seq |
| license: mit |
| language: en |
| --- |
| |
| # Model Card for `bwlw3127/clickbait-bart-dailymail` |
|
|
| This model fine-tunes [`facebook/bart-base`](https://huggingface.co/facebook/bart-base) to generate **clickbait-style headlines** from DailyMail articles. |
| It takes an article as input and produces a short, attention-grabbing headline. |
|
|
| --- |
|
|
| ## Model Details |
|
|
| ### Model Description |
|
|
| 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. |
|
|
| - **Developed by:** @bwlw3127 |
| - **Model type:** Seq2Seq (Encoder–Decoder) — BART |
| - **Language(s):** English |
| - **License:** MIT (code); base model follows [facebook/bart-base license](https://huggingface.co/facebook/bart-base) |
| - **Finetuned from:** `facebook/bart-base` |
|
|
| ### Model Sources |
|
|
| - **Repository (code):** [GitHub – weiw3127/clickbait](https://github.com/weiw3127/clickbait) |
| - **Model (weights):** [Hugging Face Hub](https://huggingface.co/bwlw3127/clickbait-bart-dailymail) |
|
|
| --- |
|
|
| ## Uses |
|
|
| ### Direct Use |
|
|
| - Generate sensational or catchy headlines from article text. |
| - Educational demo for seq2seq fine-tuning with Hugging Face. |
|
|
| ### Downstream Use |
|
|
| - Adaptation to other headline-generation tasks (news summarization, marketing, etc.) by re-finetuning on different headline corpora. |
|
|
| ### Out-of-Scope Use |
|
|
| - Producing factually reliable news summaries. |
| - Sensitive domains where misleading/sensational output may cause harm. |
|
|
| --- |
|
|
| ## Bias, Risks, and Limitations |
|
|
| - The model reflects biases in DailyMail content and clickbait style. |
| - Headlines may exaggerate, distort, or misrepresent facts. |
| - It should not be used in production systems where factual accuracy is critical. |
|
|
| ### Recommendations |
|
|
| - Use only in controlled or educational contexts. |
| - Always review outputs manually before publishing. |
|
|
| --- |
|
|
| ## How to Get Started with the Model |
|
|
| ```python |
| from 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)) |
| |