UNPKG

wrapture

Version:

Wrapture lets you go from a Python-trained model to deployable JavaScript with a single command. It generates TypeScript bindings and a Web/Node-compatible wrapper, using WebGPU/WASM-ready ONNX runtimes.

12 lines (9 loc) 257 B
/* eslint-disable no-console */ import { loadModel } from '../wrapped.js'; const model = await loadModel(); const input = { data: new Float32Array(1 * 3 * 224 * 224), dims: [1, 3, 224, 224] }; const out = await model.predict(input); console.log(out);