cryptoindex / README_HF.md
igriv's picture
Debug and fix Supabase initialization for HF Spaces
5d435b4
# Hugging Face Spaces Deployment Guide
## Files to Upload
Upload these files to your HF Space:
- `app.py` (entry point)
- `index_interface_supabase.py`
- `cryptoindex.py`
- `updater.py`
- `requirements.txt`
**DO NOT upload:**
- `.env` (use HF Secrets instead)
- `.git/` directory
- `__pycache__/`
- `index_interface.py` (old version)
## Setting up Secrets
In your Space settings → Variables and secrets, add:
- `SUPABASE_URL` = your-supabase-url
- `SUPABASE_KEY` = your-supabase-key
- `POLYGON_API_KEY` = your-polygon-key
## Space Configuration
1. Create new Space
2. Select "Gradio" as the SDK
3. Choose "Private" visibility
4. Upload files
5. Add secrets
6. Space will auto-deploy
## Testing
Your app will be available at:
`https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME`
The private setting ensures only you (and people you authorize) can access it.