Downloads · 30 days
36
11% of all-time downloads
akanbrown/AI-Fake_News_Detection_Roberta
AI-Fake_News_Detection_Roberta is a text classification model from akanbrown. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
A RoBERTa-based text classification model for detecting fake news articles. This model was evaluated on the WELFake dataset as part of a final year project focused on misinformation detection using NLP.
Downloads · 30 days
36
11% of all-time downloads
All-time downloads
336
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
A RoBERTa-based text classification model for detecting fake news articles. This model was evaluated on the WELFake dataset as part of a final year project focused on misinformation detection using NLP.
This model can be used directly for binary classification of news articles as either FAKE or REAL without any additional fine-tuning.
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="Akan-Brown/fakenews-detector",
truncation=True,
max_length=512
)
result = classifier("Your news article text here")[0]
label = "REAL" if result["label"] == "LABEL_1" else "FAKE"
print(f"Prediction: {label} ({result['score']:.2%} confidence)")
| Label | Meaning |
|---|---|
LABEL_0 | FAKE news |
LABEL_1 | REAL news |
This model should be used as a supplementary tool alongside human judgment and other fact-checking resources. It is not suitable for automated content moderation without human oversight.
The model was evaluated on the WELFake dataset, a benchmark dataset for fake news detection containing 72,134 news articles:
| Metric | Score |
|---|---|
| Accuracy | reported after evaluation |
| F1 Score (weighted) | reported after evaluation |
| Precision | reported after evaluation |
| Recall | reported after evaluation |
Replace the values above with your actual results from Cell 7 output.
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="Akan-Brown/fakenews-detector",
truncation=True,
max_length=512
)
articles = [
"Federal Reserve raises interest rates by 0.25% amid inflation concerns.",
"SHOCKING: Government putting microchips in vaccines, whistleblower reveals!!!",
]
for article in articles:
result = classifier(article)[0]
label = "REAL ✅" if result["label"] == "LABEL_1" else "FAKE ❌"
print(f"{label} ({result['score']:.2%}) — {article[:60]}")
import os
from huggingface_hub import InferenceClient
client = InferenceClient(
provider="hf-inference",
api_key=os.environ["HF_TOKEN"],
)
result = client.text_classification(
"Your news article text here",
model="Akan-Brown/fakenews-detector",
)
This model was developed as part of a Final Year Project on automated fake news detection using transformer-based NLP models. The project explores the use of pre-trained language models for identifying misinformation in online news articles.
The full system includes:
If you use this model in your research, please cite the WELFake dataset:
@article{verma2021WELFake,
title={WELFake: Word Embedding over Linguistic Features for Fake News Detection},
author={Verma, Parth and Agrawal, Priya},
journal={IEEE Transactions on Computational Social Systems},
year={2021}
}
Akan Brown — Final Year Project, 2026