Felladrin whitphx HF Staff commited on
Commit
c8e80b1
·
verified ·
1 Parent(s): 7d56020

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 (8f1918f5d993eba2d0192a46d3f4d9a85dcfa258)


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

Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -7,3 +7,19 @@ base_model:
7
  # bart-large-mnli (ONNX)
8
 
9
  This is an ONNX version of [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli). It was automatically converted and uploaded using [this space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  # bart-large-mnli (ONNX)
8
 
9
  This is an ONNX version of [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli). It was automatically converted and uploaded using [this space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).
10
+
11
+ ## Usage (Transformers.js)
12
+
13
+ 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:
14
+ ```bash
15
+ npm i @huggingface/transformers
16
+ ```
17
+
18
+ **Example:** Natural Language Inference (NLI) classification.
19
+
20
+ ```js
21
+ import { pipeline } from '@huggingface/transformers';
22
+
23
+ const classifier = await pipeline('text-classification', 'onnx-community/bart-large-mnli-ONNX');
24
+ const output = await classifier('I love transformers!');
25
+ ```