From 0432df6c2deca342ee4e58d7ee08a79d35f8bb55 Mon Sep 17 00:00:00 2001 From: Joshua Lochner Date: Tue, 22 Oct 2024 04:25:09 +0000 Subject: [PATCH] Swap installation and quick tour sections --- README.md | 32 ++++++++++++++++---------------- docs/scripts/build_readme.py | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 41c918470..c2c0cb6a8 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,22 @@ Transformers.js uses [ONNX Runtime](https://onnxruntime.ai/) to run models in th For more information, check out the full [documentation](https://huggingface.co/docs/transformers.js). +## Installation + + +To install via [NPM](https://www.npmjs.com/package/@huggingface/transformers), run: +```bash +npm i @huggingface/transformers +``` + +Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), you can import the library with: +```html + +``` + + ## Quick tour @@ -111,22 +127,6 @@ const pipe = await pipeline('sentiment-analysis', 'Xenova/distilbert-base-uncase ``` -## Installation - - -To install via [NPM](https://www.npmjs.com/package/@huggingface/transformers), run: -```bash -npm i @huggingface/transformers -``` - -Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), you can import the library with: -```html - -``` - - ## Examples Want to jump straight in? Get started with one of our sample applications/templates, which can be found [here](https://github.com/huggingface/transformers.js-examples). diff --git a/docs/scripts/build_readme.py b/docs/scripts/build_readme.py index 49a2e6400..84bb30cf0 100644 --- a/docs/scripts/build_readme.py +++ b/docs/scripts/build_readme.py @@ -22,14 +22,14 @@ {intro} -## Quick tour - -{quick_tour} - ## Installation {installation} +## Quick tour + +{quick_tour} + ## Examples {examples}