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 (b86d3afe271fb9de9a68cb11733a72ee02883710)
Co-authored-by: Yuichiro Tachibana <[email protected]>
README.md
CHANGED
|
@@ -8,15 +8,15 @@ https://huggingface.co/mattmdjaga/segformer_b0_clothes with ONNX weights to be c
|
|
| 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/@
|
| 12 |
```bash
|
| 13 |
-
npm i @
|
| 14 |
```
|
| 15 |
|
| 16 |
**Example:** Clothes segmentation with `Xenova/segformer_b0_clothes`.
|
| 17 |
|
| 18 |
```js
|
| 19 |
-
import { pipeline } from '@
|
| 20 |
|
| 21 |
const segmenter = await pipeline('image-segmentation', 'Xenova/segformer_b0_clothes');
|
| 22 |
|
|
@@ -51,6 +51,4 @@ for (const l of output) {
|
|
| 51 |
|
| 52 |
---
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|
|
|
|
| 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:** Clothes segmentation with `Xenova/segformer_b0_clothes`.
|
| 17 |
|
| 18 |
```js
|
| 19 |
+
import { pipeline } from '@huggingface/transformers';
|
| 20 |
|
| 21 |
const segmenter = await pipeline('image-segmentation', 'Xenova/segformer_b0_clothes');
|
| 22 |
|
|
|
|
| 51 |
|
| 52 |
---
|
| 53 |
|
|
|
|
|
|
|
| 54 |
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|