--- title: Taiwan Stock Predictor emoji: 📈 colorFrom: blue colorTo: indigo sdk: docker app_port: 7860 pinned: false --- # Taiwan Stock ML Predictor API FastAPI backend with RandomForest ML model for Taiwan stock prediction (TWSE/TPEX). ## Hugging Face Free CPU Notes This Docker Space is tuned for Hugging Face CPU Basic: - `LIGHTWEIGHT_MODE=1` - `MODEL_MEM_CACHE_SIZE=3` - `INSTITUTIONAL_FLOW_DAYS=60` - `INSTITUTIONAL_FLOW_WORKERS=2` - `WARMUP_STOCKS=""` - one `uvicorn` worker on port `7860` These defaults keep cold starts and memory use modest on the free 2 vCPU / 16 GB RAM Space while preserving the 5-day prediction flow. For backtests or accuracy experiments outside the free Space, increase `INSTITUTIONAL_FLOW_DAYS` to `260` and enable warmup stocks explicitly.