Spaces:
Sleeping
Sleeping
| # Setup Secrets on Hugging Face Spaces | |
| After uploading these files to your HF Space, configure secrets: | |
| ## Required (at least one) | |
| Go to: **Settings → Variables and secrets** | |
| Add: | |
| ``` | |
| ANTHROPIC_API_KEY = sk-ant-... | |
| ``` | |
| OR | |
| ``` | |
| OPENAI_API_KEY = sk-... | |
| ``` | |
| OR | |
| ``` | |
| GOOGLE_API_KEY = AIza... | |
| ``` | |
| ## Optional | |
| ``` | |
| HUGGINGFACE_API_KEY = hf_... | |
| PRIMARY_MODEL_PROVIDER = anthropic | |
| PRIMARY_MODEL = claude-3-5-sonnet-20241022 | |
| ``` | |
| ## Testing | |
| After setting secrets: | |
| 1. Wait for Space to rebuild (~3-5 min) | |
| 2. Open your app | |
| 3. Create a test character | |
| 4. Verify AI generation works | |
| ## Troubleshooting | |
| **Build fails:** | |
| - Check requirements.txt syntax | |
| - Verify all files uploaded | |
| **App crashes:** | |
| - Check Logs tab for errors | |
| - Verify API keys in Secrets | |
| **No AI generation:** | |
| - Confirm at least one API key is set | |
| - Check API key is valid | |
| - Review error messages in Status box | |