huggingface-widgets v0.15.0
Open-source version of the inference widgets from huggingface.co. Widgets allow anyone to do inference directly on the browser! For more information about widgets, please go to our documentation.
How to develop
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Build for Netlify
npm run build
Publish package
npm run publish
Contribution guideline
- Create a new branch to which you will be pushing your updates
- Use descriptive name for your branch (e.g.
widget_object_detection
) - Create your widget in
src/lib/InferenceWidget/widgets/[MyNewWidget].svelte
- Try to use as many components as possible from
shared
- For the API contract, check out Accelerated Inference API doc & Integrating your library to the Hub
- For your widget, make sure to implement getOutput, isValidOutput, parseOutput (raise TypeError on invalid output), and all other necessary functions for your widget to work
- Submit a PR when done (or draft PR if you are still working on it & would like to collaborate)
- See previous widget PRs
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago