Spaces:
Sleeping
Sleeping
File size: 996 Bytes
1048608 ef6ab98 1048608 ef6ab98 1048608 ef6ab98 1048608 ef6ab98 | 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 | ---
title: Truth Detector API
emoji: 🔍
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit
---
# Truth Detector API
Backend API for Fake News Detection — served via Flask + Gunicorn on a Docker Space.
## REST API Endpoints
| Method | Route | Description |
|--------|-------|-------------|
| GET | `/api/health` | Health check |
| POST | `/api/register` | Register a new user |
| POST | `/api/login` | Login and get JWT token |
| POST | `/api/predict` | Run fake news prediction |
| GET | `/api/metrics` | List available models and metrics |
| POST | `/api/recommend-model` | Get recommended model for input text |
| POST | `/api/verify` | External Google Fact Check API lookup |
## Environment Variables (Space Secrets)
| Variable | Description |
|----------|-------------|
| `DATABASE_URL` | Neon PostgreSQL connection URI |
| `TRUTH_SECRET_KEY` | JWT signing secret |
| `FRONTEND_ORIGIN` | Allowed CORS origin (Vercel URL) |
|