Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sveltekit Client + Server example #254

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

radames
Copy link

@radames radames commented Aug 18, 2023

Add two examples for Svelte kit client + server
Docs with walkthrough

@radames radames force-pushed the sveltekit-example branch from 1083699 to 1a4fe2e Compare August 18, 2023 23:14
docs/source/_toctree.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@xenova xenova left a comment

Choose a reason for hiding this comment

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

Very cool so far! I look forward to getting this merged.

docs/source/_toctree.yml Outdated Show resolved Hide resolved
docs/source/tutorials/sveltekit.mdx Outdated Show resolved Hide resolved
docs/source/tutorials/sveltekit.mdx Outdated Show resolved Hide resolved
docs/source/tutorials/sveltekit.mdx Outdated Show resolved Hide resolved
docs/source/tutorials/sveltekit.mdx Show resolved Hide resolved
docs/source/tutorials/sveltekit.mdx Outdated Show resolved Hide resolved
docs/source/tutorials/sveltekit.mdx Outdated Show resolved Hide resolved
examples/sveltekit-server/.eslintrc.cjs Outdated Show resolved Hide resolved
examples/sveltekit-server/.prettierrc Outdated Show resolved Hide resolved
examples/sveltekit-server/package.json Outdated Show resolved Hide resolved
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@xenova
Copy link
Collaborator

xenova commented Aug 19, 2023

@radames btw you can view the docs here 🥳. Looks pretty good so far!

@radames
Copy link
Author

radames commented Aug 20, 2023

addressed all comments @xenova ! thanks for the review. how do you trigger the ephemeral docs build?

@xenova
Copy link
Collaborator

xenova commented Aug 20, 2023

how do you trigger the ephemeral docs build?

I think only I can trigger it - which I have done now :)

@xenova
Copy link
Collaborator

xenova commented Aug 20, 2023

Updated 👍

PS: Could you grant me write access to your fork? I'll try running this on a clean linux install tomorrow to see if everything works as intended. I've never built a svelte[kit] app before, so I'm probably the perfect guinea pig! 🤣

@radames
Copy link
Author

radames commented Aug 20, 2023

@xenova perfect! thanks feel free to push anything, I think I've checked the box!!
image

@xenova
Copy link
Collaborator

xenova commented Aug 20, 2023

While playing with the server-side app, it takes a few seconds before being ready, but if the user types something before it's finished loading, it doesn't update when ready:
bug

This doesn't happen with the next-server example. Do you have an idea on how to fix it?

@radames
Copy link
Author

radames commented Aug 21, 2023

hi @xenova, not sure if I can reproduce this, perhaps pinging the backend onMount to load the model?

	onMount(() => {
		// Make a request to the /classify routem, load the model
		fetch("/classify?text='Hello'");
	});

@radames
Copy link
Author

radames commented Aug 21, 2023

@xenova added extra svelte, minor difference from svelteki

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