Spaces:
Sleeping
Sleeping
File size: 877 Bytes
71b378e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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
|