@huggingface/inference 2.2.2 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/index.d.ts +1260 -0
- package/dist/index.js +59 -21
- package/dist/index.mjs +57 -21
- package/package.json +7 -5
- package/src/index.ts +1 -0
- package/src/tasks/cv/imageToImage.ts +83 -0
- package/src/tasks/index.ts +1 -0
- package/src/tasks/multimodal/documentQuestionAnswering.ts +7 -3
- package/src/tasks/multimodal/visualQuestionAnswering.ts +7 -3
- package/src/utils/pick.ts +0 -3
package/README.md
CHANGED
|
@@ -170,6 +170,14 @@ await hf.imageToText({
|
|
|
170
170
|
model: 'nlpconnect/vit-gpt2-image-captioning'
|
|
171
171
|
})
|
|
172
172
|
|
|
173
|
+
await hf.imageToImage({
|
|
174
|
+
inputs: readFileSync("test/stormtrooper_depth.png"),
|
|
175
|
+
parameters: {
|
|
176
|
+
prompt: "elmo's lecture",
|
|
177
|
+
},
|
|
178
|
+
model: "lllyasviel/sd-controlnet-depth",
|
|
179
|
+
});
|
|
180
|
+
|
|
173
181
|
// Multimodal
|
|
174
182
|
|
|
175
183
|
await hf.visualQuestionAnswering({
|
|
@@ -260,12 +268,15 @@ const { generated_text } = await gpt2.textGeneration({inputs: 'The answer to the
|
|
|
260
268
|
- [x] Image segmentation
|
|
261
269
|
- [x] Text to image
|
|
262
270
|
- [x] Image to text - [demo](https://huggingface.co/spaces/huggingfacejs/image-to-text)
|
|
271
|
+
- [x] Image to Image
|
|
263
272
|
|
|
264
273
|
### Multimodal
|
|
274
|
+
|
|
265
275
|
- [x] Document question answering - [demo](https://huggingface.co/spaces/huggingfacejs/doc-vis-qa)
|
|
266
276
|
- [x] Visual question answering - [demo](https://huggingface.co/spaces/huggingfacejs/doc-vis-qa)
|
|
267
277
|
|
|
268
278
|
### Tabular
|
|
279
|
+
|
|
269
280
|
- [x] Tabular regression
|
|
270
281
|
|
|
271
282
|
## Tree-shaking
|
|
@@ -288,7 +299,7 @@ This will enable tree-shaking by your bundler.
|
|
|
288
299
|
## Running tests
|
|
289
300
|
|
|
290
301
|
```console
|
|
291
|
-
HF_ACCESS_TOKEN="your access token"
|
|
302
|
+
HF_ACCESS_TOKEN="your access token" pnpm run test
|
|
292
303
|
```
|
|
293
304
|
|
|
294
305
|
## Finding appropriate models
|