File size: 1,290 Bytes
71c1ad2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# ============================================
# Hubble AI Engine - Environment Configuration
# ============================================
# On Hugging Face Spaces, set these as Secrets
# in the Space settings (Settings > Secrets).
# They are injected as environment variables at runtime.

# Server
HOST=0.0.0.0
PORT=7860
ENV=production
LOG_LEVEL=INFO

# MongoDB (async via motor)
MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/hubble
MONGODB_DB_NAME=hubble

# Redis
REDIS_URL=redis://default:<password>@<host>:<port>
REDIS_CACHE_TTL=300

# Gemini API Keys (comma-separated for rotation)
GEMINI_API_KEYS=your-key-1,your-key-2,your-key-3
GEMINI_MODEL=gemini-2.5-flash

# LangSmith Observability (optional)
LANGSMITH_API_KEY=your-langsmith-api-key
LANGSMITH_PROJECT=hubble-moderation
LANGSMITH_TRACING_V2=true

# JWT Secrets (use long random strings)
JWT_ACCESS_SECRET=your-access-secret-at-least-32-chars
JWT_REFRESH_SECRET=your-refresh-secret-at-least-32-chars

# Model Configuration
MODEL_CACHE_DIR=/tmp/model_cache
ONNX_ENABLED=false
TEXT_MODEL_NAME=unitary/toxic-bert
IMAGE_MODEL_NAME=google/efficientnet-b0
CLIP_MODEL_NAME=openai/clip-vit-base-patch32

# Risk Thresholds
RISK_LOW_MAX=30
RISK_MEDIUM_MAX=65

# Video Processing
VIDEO_MAX_FRAMES=10
VIDEO_FPS_SAMPLE=1