LocInsight ML Engine

Browser-based site selection scoring for MAP Active Adiperkasa (MAA)

Downloading Pyodide runtime + scikit-learn (~25MB, cached after first visit)...

LocInsight ML Engine

Browser-based site selection scoring for MAP Active Adiperkasa (MAA)

Runs entirely in your browser via Pyodide (WebAssembly) · HF Spaces Static SDK · Free tier compatible

Service Status

Quick liveness + Supabase connectivity check. No auth required — uses Supabase publishable key with RLS.

Click the button above to check service status.

Store Success Probability Score

Input a candidate site coordinate to get a 0-100% score based on competitor density, POI density, demographics, and mall proximity. If a GBR model has been trained in the "Train Model" tab, it will be used; otherwise a transparent weighted heuristic applies.

Bali centroid default
Prediction result will appear here.

Recommended Blank Spot Areas

High-score candidate sites with no existing MAA store nearby. Highlighted in green on the LocInsight map.

Recommendations will appear here.

Train Gradient Boosting Regressor (in-browser)

Trains a GBR model on synthetic data using scikit-learn (pre-loaded at page startup via Pyodide packages config). The trained model is active for this browser session and will be used by Predict and Blank Spots tabs.

Training result will appear here. scikit-learn is pre-loaded at page startup (~15MB, cached by browser after first visit).

Active Model Info

Model metadata will appear here.

Browse Raw Master Data

Read-only view of Supabase master tables. RLS allows anon read on these tables.

Data will appear here.

LocInsight ML Engine — PyScript Edition

What changed from v1?

v1 used FastAPI + Docker SDK on HF Spaces, which required cpu-basic hardware. HF free tier has cpu-basic quota = 0, so the Space was permanently PAUSED.

v2 (this version) uses PyScript — Python runs in your browser via Pyodide (WebAssembly). The HF Space is served as static files (HTML/CSS/JS), which works on the free tier with zero compute quota.

Trade-offs:

  • Compute: Client-side (browser) — no server needed
  • API for Vercel: No (browser-only) — Vercel frontend uses its own TS ML engine
  • Cold start: None (static)
  • ML libraries: Pyodide-supported (numpy, scikit-learn via micropip)
  • Cost: Free forever
  • Persistence: localStorage (metadata only) + Supabase read (anon RLS)

Source code: github.com/bayhaqy/LocInsights_ml

Maintained by: Achmad Bayhaqy — Data Team, MAP Active Adiperkasa (MAA)