Pagornsun/gistda-ml
0
GISTDA ML Inference Service
ML service แยกจาก Vercel — แบก onnxruntime ได้เต็มที่ (Vercel bundle จำกัด 250MB) รันบน Hugging Face Spaces (Docker, ฟรี ไม่ต้องบัตร)
[Vercel /api/forecast?model=onnx] ──POST /predict/hotspots──> [HF Space]
(เบา ไม่มี onnxruntime) FastAPI + onnxruntime
โหลดโมเดลจาก R2Endpoints
ไฟล์
Secrets (ตั้งใน Space settings — ไม่ commit ลง repo)
R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET
⚠️features.pyต้อง sync กับsrc/ml_features.pyเสมอ (แก้ feature → copy ใหม่ + เทรนใหม่)
