File size: 702 Bytes
bc69da8 3ccf208 6e531bf bc69da8 2a4c76c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
---
library_name: transformers.js
pipeline_tag: translation
---
https://huggingface.co/Helsinki-NLP/opus-mt-ar-en with ONNX weights to be compatible with Transformers.js.
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`).
// npm i @xenova/transformers
import { pipeline } from '@xenova/transformers';
// Allocate pipeline
const pipe = await pipeline('translation', 'Xenova/opus-mt-ar-en');
|