truth-detector-api / README.md
waliullah123's picture
Upload README.md
ef6ab98 verified
|
Raw
History Blame Contribute Delete
996 Bytes
---
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) |