davanstrien/WELFake
Viewer • Updated • 72.1k • 351 • 2
How to use himel05/fake-news-roberta with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="himel05/fake-news-roberta") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("himel05/fake-news-roberta")
model = AutoModelForSequenceClassification.from_pretrained("himel05/fake-news-roberta")This model is a RoBERTa-base transformer fine-tuned on the WELFake Dataset for binary text classification (Real/Fake news).
It was trained using class weight balancing and a weighted loss function to ensure robust and balanced performance.
Important Note on Labels
This specific model uses reversed labels:
Label 0 corresponds to REAL news.
Label 1 corresponds to FAKE news.
Base model
FacebookAI/roberta-base