Skip to content

docs: add Svelte tutorial#1589

Open
mvanhorn wants to merge 1 commit intohuggingface:mainfrom
mvanhorn:docs/svelte-example-guide
Open

docs: add Svelte tutorial#1589
mvanhorn wants to merge 1 commit intohuggingface:mainfrom
mvanhorn:docs/svelte-example-guide

Conversation

@mvanhorn
Copy link

Summary

  • Adds a step-by-step tutorial for building a multilingual translation app with Svelte + Vite + Transformers.js
  • Mirrors the structure of the existing React tutorial: project init, Web Worker for ML inference, Svelte components, CSS styling, and HF Spaces deployment
  • Adds the Svelte tutorial entry to _toctree.yml (placed between React and Next.js)

Closes #171

Test plan

  • Verify the tutorial renders correctly in the HuggingFace docs preview
  • Follow the tutorial steps to confirm a working Svelte app can be created
  • Confirm the _toctree.yml ordering is correct and the page appears in the sidebar

Add a step-by-step tutorial showing how to build a multilingual
translation app using Svelte and Vite with Transformers.js. The
tutorial mirrors the existing React tutorial structure and covers
project setup, Web Worker usage for ML inference, UI components,
and deployment to Hugging Face Spaces.

Closes huggingface#171
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

</script>

<div class="progress-container">
<div class="progress-bar" style="width: {percentage}%">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would avoid inline style, it could conflict with strict CSP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc request] Add an example guide of how to use it in Svelte (and deploy to HF Spaces)

3 participants