Update to Transformers.js v3
Browse files
README.md
CHANGED
@@ -8,17 +8,14 @@ https://huggingface.co/facebook/musicgen-small with ONNX weights to be compatibl
|
|
8 |
|
9 |
## Usage (Transformers.js)
|
10 |
|
11 |
-
|
12 |
-
> NOTE: MusicGen support is experimental and requires you to install Transformers.js [v3](https://github.com/xenova/transformers.js/tree/v3) from source.
|
13 |
-
|
14 |
-
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [GitHub](https://github.com/xenova/transformers.js/tree/v3) using:
|
15 |
```bash
|
16 |
-
npm install
|
17 |
```
|
18 |
|
19 |
**Example:** Generate music with `Xenova/musicgen-small`.
|
20 |
```js
|
21 |
-
import { AutoTokenizer, MusicgenForConditionalGeneration } from '@
|
22 |
|
23 |
// Load tokenizer and model
|
24 |
const tokenizer = await AutoTokenizer.from_pretrained('Xenova/musicgen-small');
|
|
|
8 |
|
9 |
## Usage (Transformers.js)
|
10 |
|
11 |
+
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
|
|
|
|
|
|
12 |
```bash
|
13 |
+
npm install @huggingface/transformers
|
14 |
```
|
15 |
|
16 |
**Example:** Generate music with `Xenova/musicgen-small`.
|
17 |
```js
|
18 |
+
import { AutoTokenizer, MusicgenForConditionalGeneration } from '@huggingface/transformers';
|
19 |
|
20 |
// Load tokenizer and model
|
21 |
const tokenizer = await AutoTokenizer.from_pretrained('Xenova/musicgen-small');
|