File size: 1,355 Bytes
f8e24d3
f7d64d5
 
 
 
35091d4
f8e24d3
 
 
 
f7d64d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
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.