Update README.md
Browse files
README.md
CHANGED
@@ -7,19 +7,16 @@ tags:
|
|
7 |
- vision
|
8 |
- text-generation
|
9 |
- text2text-generation
|
10 |
-
- image-
|
11 |
---
|
12 |
|
13 |
https://huggingface.co/microsoft/Florence-2-base with ONNX weights to be compatible with Transformers.js.
|
14 |
|
15 |
## Usage (Transformers.js)
|
16 |
|
17 |
-
|
18 |
-
> NOTE: Florence-2 support is experimental and requires you to install Transformers.js [v3](https://github.com/xenova/transformers.js/tree/v3) from source.
|
19 |
-
|
20 |
-
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [GitHub](https://github.com/xenova/transformers.js/tree/v3) using:
|
21 |
```bash
|
22 |
-
npm
|
23 |
```
|
24 |
|
25 |
**Example:** Perform image captioning with `onnx-community/Florence-2-base`.
|
@@ -29,7 +26,7 @@ import {
|
|
29 |
AutoProcessor,
|
30 |
AutoTokenizer,
|
31 |
RawImage,
|
32 |
-
} from '@
|
33 |
|
34 |
// Load model, processor, and tokenizer
|
35 |
const model_id = 'onnx-community/Florence-2-base';
|
|
|
7 |
- vision
|
8 |
- text-generation
|
9 |
- text2text-generation
|
10 |
+
- image-to-text
|
11 |
---
|
12 |
|
13 |
https://huggingface.co/microsoft/Florence-2-base with ONNX weights to be compatible with Transformers.js.
|
14 |
|
15 |
## Usage (Transformers.js)
|
16 |
|
17 |
+
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:
|
|
|
|
|
|
|
18 |
```bash
|
19 |
+
npm i @huggingface/transformers
|
20 |
```
|
21 |
|
22 |
**Example:** Perform image captioning with `onnx-community/Florence-2-base`.
|
|
|
26 |
AutoProcessor,
|
27 |
AutoTokenizer,
|
28 |
RawImage,
|
29 |
+
} from '@huggingface/transformers';
|
30 |
|
31 |
// Load model, processor, and tokenizer
|
32 |
const model_id = 'onnx-community/Florence-2-base';
|