Downloads · 30 days
2
0% of all-time downloads
divyanshu-chauhan-7786/fake-news-roberta
fake-news-roberta is a text classification model from divyanshu-chauhan-7786. Use it when you need a label for a piece of text.
TruthLens is an advanced RoBERTa-based Fake News Detection Transformer model fine-tuned by Divyanshu Chauhan. This model is capable of analyzing news articles and social media text and classifying them as REAL or FAKE…
Downloads · 30 days
2
0% of all-time downloads
All-time downloads
405
Public
Parameters
125M
499 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
TruthLens is an advanced RoBERTa-based Fake News Detection Transformer model fine-tuned by Divyanshu Chauhan.
This model is capable of analyzing news articles and social media text and classifying them as REAL or FAKE along with a confidence score.
It is trained on the WELFake Dataset containing over 72,000 labeled news samples, balanced and cleaned for high-accuracy text classification.
This model powers the TruthLens Flask Application, capable of real-time misinformation detection.
0 = Fake1 = Real| Metric | Score |
|---|---|
| Accuracy | ~95% |
| F1 Score | ~95% |
| Precision | ~95% |
| Recall | ~95% |
This makes the model suitable for production-level applications.
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
model_path = "divyanshu-chauhan-7786/fake-news-roberta"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForSequenceClassification.from_pretrained(model_path)
clf = pipeline("text-classification", model=model, tokenizer=tokenizer)
text = "Breaking: Government announces new education reforms!"
result = clf(text, truncation=True, max_length=256)
print(result)