Clickbait Detection Model
This is a custom-trained text classification model created using Hugging Face AutoTrain. The model is designed to classify text into two categories:
- Clickbait
- Not Clickbait
The training was conducted using a fine-tuned version of the sentence-transformers/all-mpnet-base-v2
base model, which is well-suited for text classification tasks.
Model Details
- Base Model: sentence-transformers/all-mpnet-base-v2
- Problem Type: Text Classification
- Language: English (
en
) - Pipeline Tag: text-classification
- Tags: autotrain, text-classification
Usage
You can use this model with Hugging Face’s transformers
library to classify text into clickbait
or not clickbait
.
Example Code
from transformers import AutoTokenizer, AutoModelForSequenceClassification
# Load tokenizer and model
model_name = "Milan97/ClickbaitDetectionModel"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Input text
text = "You won’t believe what happened next!"
# Tokenize and perform inference
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)
# Get predicted label and confidence
logits = outputs.logits
predicted_class = logits.argmax(dim=1).item()
confidence = logits.softmax(dim=1).max().item()
# Label mapping
labels = {0: "Not Clickbait", 1: "Clickbait"}
print(f"Text: {text}")
print(f"Prediction: {labels[predicted_class]} (Confidence: {confidence:.2f})")
- Downloads last month
- 17
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The model has no library tag.
Model tree for Milan97/ClickbaitDetectionModel
Base model
sentence-transformers/all-mpnet-base-v2