FirstModel — From dataset to first model in minutes.
This is a Next.js app (App Router) using Convex for realtime/storage and a Modal‑hosted FastAPI backend for preprocessing, profiling and training. It turns a CSV into a reproducible baseline model and pipeline artifact quickly.
Set these in the correct places to enable preprocessing:
-
Convex (deployment env variables)
MODAL_PREPROCESS_URL: The public URL of your Modal FastAPI app endpoint. You can set the base (e.g.https://<app>.modal.run) and the system will append/preprocessautomatically.PREPROCESS_WEBHOOK_SECRET: A random secret (e.g., fromopenssl rand -hex 32) used to authenticate callbacks into Convex.CONVEX_SITE_URL(preferred): Your Convex HTTP Actions base URL (shown in the Convex panel as “HTTP Actions URL”). This is what our callbacks hit.- If you prefer,
CONVEX_URLorNEXT_PUBLIC_CONVEX_URLcan be used as fallback, butCONVEX_SITE_URLis recommended.
- If you prefer,
- CLI examples:
npx convex env set MODAL_PREPROCESS_URL https://<app>.modal.runnpx convex env set PREPROCESS_WEBHOOK_SECRET <your-secret>npx convex env set CONVEX_URL https://<project>.convex.cloud
-
Modal (secrets)
- Create a secret named
tabular-ml-agent-backendwith keyNEXT_PUBLIC_CONVEX_URL(orCONVEX_URL) set to your Convex HTTP Actions URL — the same asCONVEX_SITE_URLabove. - The backend reads
CONVEX_URLand falls back toNEXT_PUBLIC_CONVEX_URL.
- Create a secret named
-
Local (optional, for
modal serve)- You can export
CONVEX_URLin your shell so the backend picks it up when serving locally:export CONVEX_URL="$(grep NEXT_PUBLIC_CONVEX_URL .env.local | cut -d= -f2)"
- You can export
Health check: Once served/deployed, the Modal app exposes GET /health returning { "ok": true }.
Notes
- Uploads are limited to 1MB in the demo UI (see
src/app/studio/UploadClient.tsx). - Preview defaults to 5 rows and can be adjusted via the row selector.
- “Next” actions are primary; disabled buttons surface tooltips explaining why.
- Results show balanced accuracy plus accuracy/precision/recall/f1 for classification and MAE for regression.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the landing page by modifying src/app/page.tsx. The page auto‑updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
- Predict endpoint: skops allow‑list expanded to load common sklearn internals. You can opt‑in to a permissive load for testing via
ALLOW_UNTRUSTED_MODELS=1in the container env. - Training endpoint: returns additional classification metrics:
accuracy,precision(macro),recall(macro), andf1(macro), each with*_std, in addition tobalanced_accuracy. Regression still returnsmaeandmae_std.
- Brand: FirstModel
- Tagline: “From dataset to first model in minutes.”
- Metadata updated in
src/app/layout.tsx(OpenGraph/Twitter, authors, creator/publisher).