Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -10,6 +10,8 @@ If you haven't already, you can install the [Transformers.js](https://huggingfac
|
|
10 |
npm i @huggingface/transformers
|
11 |
```
|
12 |
|
|
|
|
|
13 |
```js
|
14 |
import { pipeline } from '@huggingface/transformers';
|
15 |
|
@@ -19,8 +21,8 @@ const pipe = await pipeline('automatic-speech-recognition', 'whitphx/test-transf
|
|
19 |
});
|
20 |
|
21 |
// Use the model
|
22 |
-
const
|
23 |
-
|
24 |
```
|
25 |
|
26 |
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`).
|
|
|
10 |
npm i @huggingface/transformers
|
11 |
```
|
12 |
|
13 |
+
## Basic Usage
|
14 |
+
|
15 |
```js
|
16 |
import { pipeline } from '@huggingface/transformers';
|
17 |
|
|
|
21 |
});
|
22 |
|
23 |
// Use the model
|
24 |
+
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
|
25 |
+
const output = await pipe(url);
|
26 |
```
|
27 |
|
28 |
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`).
|