text-classification ยท text ยท WASM ยท ~67 MB
"You won't believe what happened next" tells you nothing except that someone wants the click. This DistilBERT headline classifier decides whether a headline is clickbait / manipulative โ curiosity gaps, withheld payoffs, emotional bait โ or a straight, informative headline that states the news. It's a signal for media-literacy triage, not a truth verdict. Type a headline below and watch the bait meter move, all on-device.
| Model | CoolpantsMcBadass/headline-classifier |
|---|---|
| Task / pipeline | text-classification (single-label) |
| Labels | manipulative (clickbait) vs legitimate; softmax (the two scores sum to 1) |
| Architecture | DistilBERT (uncased, 66M params) fine-tuned for headline manipulation |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~67 MB, cached after first load |
| License | MIT |
| Web APIs | WebAssembly, Web Workers โ all Baseline widely available |
Type or paste a headline. The clickbait score re-computes automatically (debounced) a moment after you stop typing. Above 50% the model reads the headline as clickbait / manipulative.
This is the model's raw softmax: two numbers, manipulative and
legitimate, that sum to 1. Clickbait has a fuzzy surface signal โ the model leans on
curiosity-gap patterns it saw in training (withheld payoffs, "you won't believe", list numbers, emotional
superlatives), so it's strong on stock bait and genuinely uncertain on punchy-but-real headlines. The chips
below the meter highlight cue phrases the UI spotted โ a teaching aid, not the model's actual
features. When the two bars sit near 50/50, that uncertainty is the finding: treat the score as a
triage cue, never a truth label.
Clickbait is the front door of low-quality and manipulative media. A cheap, private, on-device flag lets you screen headlines as they're rendered โ in a reader, a feed, a browser extension โ without shipping anyone's reading habits to a server.
Type a headline, get a clickbait vs straight verdict live, and compare bait/neutral rewrites of the same story side by side.
Run a feed of headlines through a bait pre-check and triage them โ badge the clickbait as a media-literacy signal, not a verdict.
Probe the borderline โ punchy-but-real headlines, deadpan bait, curiosity gaps that turn out to be honest โ and see where the model wavers.
Chain a clickbait flag with sentiment: separate loud emotional bait from calm, negative-but-straight reporting.
Binary classification is one call; ask for both scores with top_k:
import { pipeline } from "@huggingface/transformers";
const classify = await pipeline(
"text-classification",
"CoolpantsMcBadass/headline-classifier",
{ dtype: "q8" },
); // downloads + caches ~67 MB once
const out = await classify("You won't believe what happened next", { top_k: 2 });
// โ [{ label: "manipulative", score: 0.99 }, { label: "legitimate", score: 0.01 }]
A default problem_type means Transformers.js applies a softmax over the two
classes, so manipulative and legitimate sum to 1. It runs in a Web Worker so typing
never janks.