teachable-machine-sveltekit Svelte Themes

Teachable Machine Sveltekit

Teachable Machine + SvelteKit

SvelteKit app for running a Teachable Machine image model with webcam inference in the browser.

Stack

  • SvelteKit
  • @tensorflow/tfjs
  • @teachablemachine/image

Setup

  1. Install dependencies:
npm install
  1. Export your model from Teachable Machine (Image Project).

  2. Copy exported files into:

static/tm-my-image-model/

At minimum this folder should include model.json, metadata.json, and the weight shard files.

Run locally

npm run dev

Open the app, click Start, and allow camera access.

Build

npm run build
npm run preview

Notes

  • The app expects the model at /tm-my-image-model/.
  • Teachable Machine model artifacts can be large and are currently ignored by git.

Top categories

Loading Svelte Themes