{skjsn}

{skjsn}

Train in Python. Run from frontend. No backend needed.

Train in Python.

Export scikit-learn models to JSON. Run inference in the browser. Zero backend required.

$ pip install skjson
$ npm install skjson-js
100%Client-Side
0msNetwork Latency
0Dependencies (JS)

From .fit() to frontend in 3 steps

Three steps. No backend needed.

1

Train & Export

Train your scikit-learn model in Python as normal, export with skjson

skjson.save(clf, 'model.json')
2

Load in JS

Import the JSON model in your frontend environment

import modelJson from './model.json'
3

Predict Instantly

Load the predictor and call .predict() in the browser

const preds = loadModel(modelJson).predict(new_data)

Get Started

from sklearn.ensemble import RandomForestClassifier
import skjson

clf = RandomForestClassifier().fit(X, y)
skjson.save(clf, 'model.json')
import { loadModel } from 'skjson-js'
import modelJson from './model.json'

const predictor = loadModel(modelJson)
const preds = predictor.predict(new_data)

Try It Yourself

This Iris classifier is running entirely in your browser. No server. No API.

Scroll to load demo...

Why {skjsn}?

Everything you need to deploy scikit-learn models to the frontend.

No Backend

No API, no server costs. Run models directly on the client.

Instant Inference

Zero network round-trip latency. Predictions happen in milliseconds.

Safe & Secure

JSON can't execute arbitrary code like Pickle can.

Works Anywhere

React, Vue, Node, Edge functions—any JS environment.

Inspectable

Open the JSON and see exactly what your model learned.

Full Customizability

Build real bespoke dashboards. Escape the rigid UI constraints of Streamlit or Gradio.

The {skjsn} Timeline

skjson

A pure Python tool to export scikit-learn models to standard JSON.

skjson-js

Zero dependencies Javascript runner to execute JSON models natively.

skjson-visualiser

A python and javascript package leveraging on the explainability of the json format to visualise the models.

for you to contribute

Open source contributions are welcome!

Open Source & Growing

skjson is free and open source. Contributions, bug reports, and ideas are always welcome.