Spaces:
Sleeping
Sleeping
| title: DGaze News Verification | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 4.0.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| short_description: Advanced news verification system using AI with Auth0 authentication | |
| # DGaze - Advanced News Verification System | |
| An advanced AI-powered news verification system with authentication that helps identify potentially misleading or false information. | |
| ## Features | |
| - **π Authentication**: Secure Auth0 integration with trial and full access modes | |
| - **π Free Trial**: 2 free verifications for unauthenticated users | |
| - **π Real-time Analysis**: Instant verification of news articles and URLs | |
| - **π Credibility Scoring**: Detailed credibility scores for news content | |
| - **π Source Verification**: Check the reliability of news sources | |
| - **π± Multiple Interfaces**: Trial, login, and authenticated user interfaces | |
| - **π¨ Beautiful UI**: Professional gradient design with responsive layout | |
| ## How to Use | |
| ### Free Trial (No Login Required) | |
| 1. Visit the **trial interface** at `/trial` | |
| 2. **Paste news text** or **URL** in the input box | |
| 3. **Click "Verify News"** to analyze the content | |
| 4. **Get detailed results** including credibility score and analysis | |
| 5. Enjoy **2 free verifications** per session | |
| ### Full Access (With Login) | |
| 1. **Click "Sign In"** to authenticate via Auth0 | |
| 2. Get **unlimited verifications** | |
| 3. Access to **premium features** | |
| 4. **Session persistence** across visits | |
| ## Configuration | |
| This Space requires the following environment variables to be set in the Space settings: | |
| ### Required Environment Variables | |
| ```bash | |
| # Backend API Configuration (REQUIRED) | |
| API_BASE_URL=your-backend-api-url | |
| # Auth0 Configuration (REQUIRED for authentication) | |
| AUTH0_DOMAIN=your-auth0-domain | |
| AUTH0_CLIENT_ID=your-auth0-client-id | |
| AUTH0_CLIENT_SECRET=your-auth0-client-secret | |
| AUTH0_AUDIENCE=your-auth0-audience | |
| # Security | |
| SECRET_KEY=your-session-secret-key | |
| # Optional: App Configuration | |
| GRADIO_SERVER_NAME=0.0.0.0 | |
| GRADIO_SERVER_PORT=7860 | |
| DEBUG=false | |
| ``` | |
| ### Setting Environment Variables | |
| 1. Go to your **Space Settings** | |
| 2. Find **"Repository secrets"** or **"Variables and secrets"** | |
| 3. Add each variable with **"Private"** visibility for sensitive data | |
| 4. **Restart the Space** after adding variables | |
| ## Try the Examples | |
| We've included sample news articles to demonstrate the verification capabilities: | |
| - Suspicious breakthrough claims with questionable sources | |
| - Real news with proper sourcing and verification | |
| ## Architecture | |
| This application uses: | |
| - **FastAPI**: Backend API framework with Auth0 integration | |
| - **Gradio**: Interactive web interface with multiple mounted apps | |
| - **Auth0**: Secure authentication and user management | |
| - **Session Management**: Trial tracking and user state management | |
| - **Modular Design**: Clean separation of concerns with api/, config/, and components/ modules | |
| ## API Integration | |
| The app connects to a backend API for news verification. Make sure your backend API supports: | |
| - `POST /api/verify` - Main verification endpoint | |
| - `GET /api/health` - Health check endpoint | |
| ## Local Development | |
| To run locally: | |
| 1. Clone this repository | |
| 2. Install dependencies: `pip install -r requirements.txt` | |
| 3. Set up your `.env` file with the required variables | |
| 4. Run: `python app.py` | |
| 5. Access at `http://localhost:3000` | |
| ## Built With | |
| - **Gradio**: Interactive web interface | |
| - **FastAPI**: Modern, fast web framework | |
| - **Auth0**: Authentication platform | |
| - **Python**: Backend processing | |
| - **Hugging Face Spaces**: Hosting platform | |
| --- | |
| *Built with β€οΈ for fighting misinformation and promoting media literacy* |