Xenova HF Staff whitphx HF Staff commited on
Commit
08c93d1
·
verified ·
1 Parent(s): 05905cc

Add/update the quantized ONNX model files and README.md for Transformers.js v3 (#1)

Browse files

- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (c42bfb1ad02ceb2ad443889057e6e64170151048)


Co-authored-by: Yuichiro Tachibana <[email protected]>

Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -8,15 +8,15 @@ https://huggingface.co/nvidia/mit-b2 with ONNX weights to be compatible with Tra
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/@xenova/transformers) using:
12
  ```bash
13
- npm i @xenova/transformers
14
  ```
15
 
16
  **Example:** Perform image classification with `Xenova/mit-b2`.
17
 
18
  ```js
19
- import { pipeline } from '@xenova/transformers';
20
 
21
  // Create image classification pipeline
22
  const classifier = await pipeline('image-classification', 'Xenova/mit-b2');
@@ -24,7 +24,7 @@ const classifier = await pipeline('image-classification', 'Xenova/mit-b2');
24
  // Classify an image
25
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg';
26
  const output = await classifier(url);
27
- console.log(output)
28
  // [{ label: 'tiger, Panthera tigris', score: 0.761507511138916 }]
29
  ```
30
 
 
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 i @huggingface/transformers
14
  ```
15
 
16
  **Example:** Perform image classification with `Xenova/mit-b2`.
17
 
18
  ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
 
21
  // Create image classification pipeline
22
  const classifier = await pipeline('image-classification', 'Xenova/mit-b2');
 
24
  // Classify an image
25
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg';
26
  const output = await classifier(url);
27
+ console.log(output);
28
  // [{ label: 'tiger, Panthera tigris', score: 0.761507511138916 }]
29
  ```
30