Skip to content

Commit

Permalink
Swap installation and quick tour sections
Browse files Browse the repository at this point in the history
  • Loading branch information
xenova committed Oct 22, 2024
1 parent e1de86a commit 0432df6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<script type="module">
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]';
</script>
```


## Quick tour


Expand Down Expand Up @@ -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
<script type="module">
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]';
</script>
```


## 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).
Expand Down
8 changes: 4 additions & 4 deletions docs/scripts/build_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
{intro}
## Quick tour
{quick_tour}
## Installation
{installation}
## Quick tour
{quick_tour}
## Examples
{examples}
Expand Down

0 comments on commit 0432df6

Please sign in to comment.