File size: 2,777 Bytes
102cdba
 
d9de64a
 
 
 
 
 
 
102cdba
 
d9de64a
102cdba
d9de64a
 
102cdba
d9de64a
102cdba
 
 
 
 
d9de64a
 
102cdba
d9de64a
 
 
 
 
102cdba
d9de64a
102cdba
d9de64a
 
102cdba
d9de64a
102cdba
 
 
 
 
d9de64a
 
102cdba
d9de64a
102cdba
d9de64a
102cdba
 
 
d9de64a
 
102cdba
d9de64a
102cdba
 
 
d9de64a
 
 
102cdba
 
 
d9de64a
 
102cdba
d9de64a
102cdba
 
 
d9de64a
 
102cdba
d9de64a
 
 
102cdba
d9de64a
 
 
102cdba
d9de64a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
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))