| # Deploy to Hugging Face Spaces | |
| ## Quick Start | |
| 1. **Create Space**: https://huggingface.co/new-space | |
| - Name: `evolai-proxy` (or your choice) | |
| - SDK: **Docker** | |
| - Visibility: **Public** | |
| 2. **Upload Files**: Upload these 4 files from this directory: | |
| - `app.py` | |
| - `requirements.txt` | |
| - `Dockerfile` | |
| - `README.md` | |
| 3. **Set Secret**: | |
| - Go to **Settings** → **Repository secrets** | |
| - Add secret: `REAL_API_URL` = your Owner API URL | |
| - Example: `https://your-api.example.com` | |
| 4. **Build**: Space will build automatically (~2-5 minutes) | |
| ## Test Your Deployment | |
| ```bash | |
| # Get datasets | |
| curl https://YOUR-USERNAME-evolai-proxy.hf.space/datasets | |
| # Get miner rankings | |
| curl https://YOUR-USERNAME-evolai-proxy.hf.space/evaluations/rankings | |
| ``` | |
| ## Environment Variables (Optional) | |
| In Settings → Variables, you can customize: | |
| - `RATE_LIMIT_PER_MINUTE` (default: 20) | |
| ## Support | |
| For issues, check the Logs tab in your Space settings. | |