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 (d4f1f9ada7130afc1dd6241c1137fc3f1700bb0f)
Co-authored-by: Yuichiro Tachibana <[email protected]>
README.md
CHANGED
|
@@ -7,3 +7,19 @@ base_model:
|
|
| 7 |
# privacy-policy-relation-extraction (ONNX)
|
| 8 |
|
| 9 |
This is an ONNX version of [PaDaS-Lab/privacy-policy-relation-extraction](https://huggingface.co/PaDaS-Lab/privacy-policy-relation-extraction). It was automatically converted and uploaded using [this space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# privacy-policy-relation-extraction (ONNX)
|
| 8 |
|
| 9 |
This is an ONNX version of [PaDaS-Lab/privacy-policy-relation-extraction](https://huggingface.co/PaDaS-Lab/privacy-policy-relation-extraction). 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:** Text Classification with Privacy Policy Relation Extraction.
|
| 19 |
+
|
| 20 |
+
```js
|
| 21 |
+
import { pipeline } from '@huggingface/transformers';
|
| 22 |
+
|
| 23 |
+
const classifier = await pipeline('text-classification', 'onnx-community/privacy-policy-relation-extraction-ONNX');
|
| 24 |
+
const output = await classifier('I love transformers!');
|
| 25 |
+
```
|