Spaces:
Sleeping
Sleeping
| title: TruthX Fake News Detector | |
| emoji: ๐ | |
| colorFrom: blue | |
| colorTo: red | |
| sdk: docker | |
| app_file: app.py | |
| pinned: false | |
| # TruthX - Fake News Detection | |
| TruthX uses state-of-the-art DistilBERT model to detect fake news articles with high accuracy. | |
| ## Features | |
| - **Real-time Detection**: Get instant predictions on news authenticity | |
| - **Confidence Score**: See the model's confidence level | |
| - **Multiple Models**: Supports BERT, DistilBERT, and RoBERTa models | |
| ## How to Use | |
| 1. Enter any news article or headline in the text box | |
| 2. Click "Submit" to get the prediction | |
| 3. View the classification (Real/Fake) with confidence scores | |
| ## Technical Details | |
| - **Model**: DistilBERT fine-tuned for fake news detection | |
| - **Input**: Text up to 512 tokens | |
| - **Output**: Classification label with probability scores | |
| ## API Access | |
| You can also access the model programmatically via the Hugging Face Inference API: | |
| ```python | |
| import requests | |
| API_URL = "https://api-inference.huggingface.co/models/Ankit74990/TruthX-DISTILBERT" | |
| headers = {"Authorization": "Bearer YOUR_TOKEN"} | |
| def query(text): | |
| response = requests.post(API_URL, headers=headers, json={"inputs": text}) | |
| return response.json() | |
| result = query("Your news text here") | |
| ``` | |
| ## Model Card | |
| This space uses the [TruthX-DISTILBERT](https://huggingface.co/Ankit74990/TruthX-DISTILBERT) model. |