Download .env.example from MHamdan/SPARKNET: direct link, hf CLI and curl.
- Browser
- Download file 4.61 kB
-
https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/main/.env.example
- Command line
-
hf download hf://spaces/MHamdan/SPARKNET/.env.example
-
curl -L -o .env.example https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/main/.env.example
4.61 kB
| ============================================================================ | |
| SPARKNET Environment Configuration | |
| ============================================================================ | |
| Copy this file to .env and fill in your API keys | |
| NEVER commit .env to version control! | |
| # For Streamlit Cloud deployment, add these to .streamlit/secrets.toml instead | |
| ============================================================================ | |
| ============================================================================ | |
| LLM Provider API Keys (Configure at least one for AI features) | |
| ============================================================================ | |
| Groq - Fastest inference, 14,400 requests/day free | |
| Get key: https://console.groq.com/keys | |
| GROQ_API_KEY= | |
| Google Gemini/AI Studio - 15 requests/min free | |
| Get key: https://aistudio.google.com/apikey | |
| GOOGLE_API_KEY= | |
| OpenRouter - Access to many free models with single API | |
| Get key: https://openrouter.ai/keys | |
| OPENROUTER_API_KEY= | |
| GitHub Models - Free GPT-4o, Llama 3.1 access | |
| Get token: https://github.com/settings/tokens (enable 'models' scope) | |
| GITHUB_TOKEN= | |
| HuggingFace - Thousands of free models, embeddings | |
| Get token: https://huggingface.co/settings/tokens | |
| HF_TOKEN= | |
| Together AI - $25 free credits | |
| Get key: https://www.together.ai/ | |
| TOGETHER_API_KEY= | |
| Mistral AI - Free experiment plan | |
| Get key: https://console.mistral.ai/ | |
| MISTRAL_API_KEY= | |
| ============================================================================ | |
| Premium/Paid Providers (Optional) | |
| ============================================================================ | |
| OpenAI - For GPT-4, embeddings (paid) | |
| Get key: https://platform.openai.com/api-keys | |
| OPENAI_API_KEY= | |
| Anthropic Claude - For Claude models (paid) | |
| Get key: https://console.anthropic.com/ | |
| ANTHROPIC_API_KEY= | |
| ============================================================================ | |
| Local Inference (Ollama) | |
| ============================================================================ | |
| Ollama server configuration (default: http://localhost:11434) | |
| OLLAMA_HOST=http://localhost:11434 | |
| OLLAMA_DEFAULT_MODEL=llama3.2:latest | |
| ============================================================================ | |
| Vector Store / Database Configuration | |
| ============================================================================ | |
| ChromaDB settings (local by default) | |
| CHROMA_PERSIST_DIR=./data/chroma | |
| PostgreSQL (for production deployments) | |
| DATABASE_URL=postgresql://user:password@localhost:5432/sparknet | |
| ============================================================================ | |
| Security & Authentication | |
| ============================================================================ | |
| Application secret key (generate with: python -c "import secrets; print(secrets.token_hex(32))") | |
| SECRET_KEY= | |
| Demo authentication password (for Streamlit demo) | |
| For production, use proper authentication system | |
| DEMO_PASSWORD= | |
| ============================================================================ | |
| GDPR & Data Privacy Configuration | |
| ============================================================================ | |
| # IMPORTANT: For EU deployments, ensure compliance with: | |
| - GDPR (General Data Protection Regulation) | |
| - Law 25 (Quebec privacy law) if applicable | |
| - Local data residency requirements | |
| # Options for private/on-premise deployment: | |
| 1. Use Ollama for 100% local inference (no data leaves your network) | |
| 2. Configure data retention policies in your database | |
| 3. Enable audit logging for data access tracking | |
| 4. Implement data anonymization for sensitive documents | |
| # See SECURITY.md for detailed deployment guidelines | |
| ============================================================================ | |
| Enable audit logging | |
| AUDIT_LOG_ENABLED=false | |
| AUDIT_LOG_PATH=./logs/audit.log | |
| Data retention (days, 0 = indefinite) | |
| DATA_RETENTION_DAYS=0 | |
| Enable PII detection and masking | |
| PII_DETECTION_ENABLED=false | |
| ============================================================================ | |
| Feature Flags | |
| ============================================================================ | |
| Enable experimental features | |
| ENABLE_EXPERIMENTAL=false | |
| Enable GPU acceleration | |
| ENABLE_GPU=true | |
| Enable caching | |
| ENABLE_CACHE=true | |
| CACHE_TTL_SECONDS=3600 | |
| ============================================================================ | |
| Logging & Monitoring | |
| ============================================================================ | |
| Log level: DEBUG, INFO, WARNING, ERROR | |
| LOG_LEVEL=INFO | |
| Sentry DSN for error tracking (optional) | |
| SENTRY_DSN= | |