Update README.md

#2
by whitphx HF Staff - opened
Files changed (1) hide show
  1. README.md +6 -4
README.md CHANGED
@@ -9,17 +9,19 @@ https://huggingface.co/facebook/nllb-200-distilled-600M with ONNX weights to be
9
 
10
  ## Usage (Transformers.js)
11
 
12
- 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/@xenova/transformers) using:
13
  ```bash
14
- npm i @xenova/transformers
15
  ```
16
 
17
  You can then perform multilingual translation like this:
18
  ```js
19
- import { pipeline } from '@xenova/transformers';
20
 
21
  // Create a translation pipeline
22
- const translator = await pipeline('translation', 'Xenova/nllb-200-distilled-600M');
 
 
23
 
24
  // Translate text from Hindi to French
25
  const output = await translator('जीवन एक चॉकलेट बॉक्स की तरह है।', {
 
9
 
10
  ## Usage (Transformers.js)
11
 
12
+ 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:
13
  ```bash
14
+ npm i @huggingface/transformers
15
  ```
16
 
17
  You can then perform multilingual translation like this:
18
  ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
 
21
  // Create a translation pipeline
22
+ const translator = await pipeline('translation', 'Xenova/nllb-200-distilled-600M', {
23
+ // device: "webgpu", // If you would like to run the model on your GPU (via WebGPU)
24
+ });
25
 
26
  // Translate text from Hindi to French
27
  const output = await translator('जीवन एक चॉकलेट बॉक्स की तरह है।', {