Downloads · 30 days
4
7% of all-time downloads
Saman11233/clickbait-distilbert-detector
clickbait-distilbert-detector is a text classification model from Saman11233. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
An end-to-end NLP classification model built using DistilBERT to accurately identify whether a given headline or title is Clickbait or Not Clickbait.
Downloads · 30 days
4
7% of all-time downloads
All-time downloads
58
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
An end-to-end NLP classification model built using DistilBERT to accurately identify whether a given headline or title is Clickbait or Not Clickbait.
distilbert-base-uncasedtransformers, datasetsLABEL_0: NOT CLICKBAIT (Genuine / Standard News)LABEL_1: CLICKBAIT (Sensationalized / Engagement Bait)from transformers import pipeline
# Load classifier
classifier = pipeline("text-classification", model="Saman11233/clickbait-distilbert-detector")
# Test sample
sample_headline = "10 Secrets Doctors Don't Want You to Know!"
result = classifier(sample_headline)
print(result)
from transformers import pipeline
classifier = pipeline("text-classification", model="Saman11233/clickbait-distilbert-detector")
user_input = input("Enter headline: ")
if user_input.strip():
res = classifier(user_input)[0]
label = "CLICKBAIT" if res["label"] == "LABEL_1" else "NOT CLICKBAIT"
print(f"Prediction: {label} ({res['score']*100:.2f}% confidence)")