Fake News Detection Model
Model Overview
This model is designed to classify news articles as real or fake based on their textual content. It uses a BERT-based transformer model (bert-base-uncased
) fine-tuned on a custom dataset of news articles. The model predicts whether a given article is fake or real with high accuracy.
Model License
This model is licensed under the Apache 2.0 License.
Datasets Used
The model was trained on a variety of datasets, including:
- Fake News Dataset: Contains labeled news articles with "fake" or "real" classifications.
- News Articles Dataset: A collection of news articles used for training and validation.
Languages
The model primarily works with English-language news articles, but it could be extended to other languages with appropriate data.
Metrics
The model's performance was evaluated on the following metrics:
- Accuracy: 99.58%
- Precision: 99.27%
- Recall: 99.88%
- ROC-AUC: 99.99%
- F1-Score: 99.57%
Model Details
- Base Model:
bert-base-uncased
- Fine-Tuning: The model was fine-tuned on a news dataset with labeled examples of real and fake news.
- Training Epochs: 3
- Batch Size: 32
- Optimizer: Adam with weight decay
- Learning Rate: 2e-5
Usage
To use this model, you can interact with it via the Hugging Face Inference API or integrate it into your Python-based applications.
Example code for inference:
import requests
url = "https://api-inference.huggingface.co/models/your-username/fake-news-bert"
headers = {"Authorization": "Bearer YOUR_HUGGINGFACE_API_KEY"}
payload = {"inputs": "The news article content here"}
response = requests.post(url, headers=headers, json=payload)
prediction = response.json()
print(f"Prediction: {prediction}")
- Downloads last month
- 996
Model tree for Pulk17/Fake-News-Detection
Base model
google-bert/bert-base-uncased