-
Notifications
You must be signed in to change notification settings - Fork 793
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap installation and quick tour sections
- Loading branch information
Showing
2 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
||
|
@@ -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). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters