πŸš€ Clickbait Headline Detection System

An end-to-end NLP classification model built using DistilBERT to accurately identify whether a given headline or title is Clickbait or Not Clickbait.


πŸ‘€ Author & Student Metadata

  • Developer / Author: RAJA SAAD ALI
  • Roll Number: SU72-BSCSM-F25-011
  • Program / Degree: BS Computer Science (BSCS)
  • Project Title: Clickbait Headline Detection System

πŸ› οΈ Model Architecture & Training Setup

  • Base Architecture: distilbert-base-uncased
  • Task Type: Binary Sequence Classification
  • Frameworks: PyTorch, Hugging Face transformers, datasets
  • Max Sequence Length: 128 tokens
  • Optimizer: AdamW
  • Output Classes:
    • LABEL_0: NOT CLICKBAIT (Genuine / Standard News)
    • LABEL_1: CLICKBAIT (Sensationalized / Engagement Bait)

πŸ“Š Dataset & Evaluation Metrics

  • Dataset: Clickbait Detection Dataset (Balanced News Titles and Social Media Headlines)
  • Evaluation Focus: High Accuracy, Precision, and Recall across both real and clickbait samples.

πŸ’» How to Use in Python

Option 1: Quick Pipeline Inference

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)

Option 2: Interactive Testing Loop (Google Colab)

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)")

πŸ“Œ Intended Use & Limitations

  • Intended Use: Automating content moderation, news feed curation, and assisting users in filtering clickbait content.
  • Limitations: Performs best on English news titles and short social media posts.
Downloads last month
4
Safetensors
Model size
67M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Saman11233/clickbait-distilbert-detector

Finetuned
(12707)
this model