Smart Input Router
smart-form.mov
1. Purpose
This project is an experimental, ultra-fast intent router for web forms. It uses a lightweight, feature-driven machine learning model to instantly classify user input (e.g., name, email, phone, social URL, video URL, address) and route it to the correct field in a form—either in a web frontend or as a backend service.
2. Vision
The vision is to create a "spinal cord" for micro-interactions on the web: a system that can infer user intent from a few keystrokes and make the right decision in under 20ms. The goal is to make form-filling and micro-interactions on the web seamless, ambient, and almost invisible—whether as a web widget, browser extension, or backend API.
- Not a large language model.
- Not a chatbot.
- Just a hyperfast, in-browser (or edge) intent router for micro-decisions.
3. Project Layout
edge-decisions/
├── main.py # Python: Model training, feature extraction, ONNX export
├── pyproject.toml # Python dependencies
├── uv.lock # Python lockfile
├── README.md # This file
├── docs/
│ └── engineering.md # Human-friendly ML/engineering explanation
└── web/
├── index.html # Web frontend demo
├── public/
│ ├── text_classifier.onnx # ONNX model for browser inference
│ └── feature_map.json # Feature map for JS feature vectorization
└── src/
├── inference.js # Loads ONNX model, runs inference
├── feature-extract.js # JS feature extraction (mirrors Python)
├── form-router.js # Routes input to correct field in UI
└── ambient-listener.js # Ambient keystroke capture for demo UX
- To run the Python backend:
python main.py - To run the web demo:
cd web && python -m http.serverand open http://localhost:8000