| title | SvelteKit + Transformers.js Server Template |
|---|---|
| emoji | 🧩 |
| colorFrom | yellow |
| colorTo | red |
| sdk | docker |
| pinned | false |
| app_port | 3000 |
This project, bootstrapped using create-svelte, demonstrates how to use @huggingface/transformers in SvelteKit.
-
Clone the repository:
git clone https://github.com/huggingface/transformers.js-examples.git
-
Change directory to the
sveltekitproject:cd transformers.js-examples/sveltekit -
Install the dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:5173 with your browser to see the result.
-
You can start editing the page by modifying
src/routes/+page.svelte(SvelteKit) andsrc/routes/api/classify/+server.js(Transformers.js). The page auto-updates as you edit the file.