Text Classification
Transformers
Safetensors
English
fake-news-detection
transformer-ensemble
bert
deberta
Instructions to use fauxNeuz/BertAndDeberta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fauxNeuz/BertAndDeberta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="fauxNeuz/BertAndDeberta")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("fauxNeuz/BertAndDeberta", dtype="auto") - Notebooks
- Google Colab
- Kaggle
BertAndDeberta + ViT — Transformer Ensemble for Fake News Detection
This repository hosts a multimodal fake news detection system that combines BERT, DeBERTa, and ViT models. The BERT and DeBERTa models handle textual data to classify news as either real or fake, while the ViT model is trained separately to detect AI-generated vs real images, helping assess the authenticity of visual content.
Text Models — Fake News Detection
- Architecture: Ensemble of BERT-base and DeBERTa-base
- Task: Binary Text Classification (
REALvsFAKE) - Training Framework: PyTorch using 🤗 Transformers
- License: MIT
Vision Model — AI-Generated Image Detection
- Architecture: Vision Transformer (ViT-base, vit-base-patch16-224)
- Task: Binary Image Classification ('REAL' vs 'AI-GENERATED')
- Training Framework: TensorFlow/Keras or PyTorch using Transformers
- License: MIT
Dataset
The dataset is a custom collection combining:
- News content (title + body)
- Labels:
0 = FAKE,1 = REAL
❗Disclaimer
- This project is for educational and experimental purposes only.
- It is not suitable for real-world fact-checking or serious decision-making.
- The model uses a simple binary classifier and does not verify factual correctness.
- Model may sometimes misclassify text with unclear or misleading context, and images that are abstract, artistic, or difficult to distinguish from real content.
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("fauxNeuz/BertAndDeberta")
model = AutoModelForSequenceClassification.from_pretrained("fauxNeuz/BertAndDeberta")
text = "Government confirms policy updates in healthcare sector."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
pred = outputs.logits.argmax(dim=-1).item()
print("REAL" if pred == 1 else "FAKE")