Skip to content

Commit 0432df6

Browse files
committed
Swap installation and quick tour sections
1 parent e1de86a commit 0432df6

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ Transformers.js uses [ONNX Runtime](https://onnxruntime.ai/) to run models in th
3636
For more information, check out the full [documentation](https://huggingface.co/docs/transformers.js).
3737

3838

39+
## Installation
40+
41+
42+
To install via [NPM](https://www.npmjs.com/package/@huggingface/transformers), run:
43+
```bash
44+
npm i @huggingface/transformers
45+
```
46+
47+
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:
48+
```html
49+
<script type="module">
50+
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]';
51+
</script>
52+
```
53+
54+
3955
## Quick tour
4056

4157

@@ -111,22 +127,6 @@ const pipe = await pipeline('sentiment-analysis', 'Xenova/distilbert-base-uncase
111127
```
112128

113129

114-
## Installation
115-
116-
117-
To install via [NPM](https://www.npmjs.com/package/@huggingface/transformers), run:
118-
```bash
119-
npm i @huggingface/transformers
120-
```
121-
122-
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:
123-
```html
124-
<script type="module">
125-
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]';
126-
</script>
127-
```
128-
129-
130130
## Examples
131131

132132
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).

docs/scripts/build_readme.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
2323
{intro}
2424
25-
## Quick tour
26-
27-
{quick_tour}
28-
2925
## Installation
3026
3127
{installation}
3228
29+
## Quick tour
30+
31+
{quick_tour}
32+
3333
## Examples
3434
3535
{examples}

0 commit comments

Comments
 (0)