Skip to content

Commit 59896ce

Browse files
author
machineuser
committed
🔖 @hugginface/inference v1.6.3
1 parent 401a03c commit 59896ce

File tree

3 files changed

+24
-25
lines changed

3 files changed

+24
-25
lines changed

‎docs/index.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You can run our packages with vanilla JS, without any bundler, by using a CDN or
5555
## Usage example
5656

5757
```ts
58-
import { createRepo, commit } from "@huggingface/hub";
58+
import { createRepo, uploadFile } from "@huggingface/hub";
5959
import { HfInference } from "@huggingface/inference";
6060

6161
// use an access token from your free account
@@ -66,15 +66,14 @@ await createRepo({
6666
credentials: {accessToken: HF_ACCESS_TOKEN}
6767
});
6868

69-
await commit({
69+
await uploadFile({
7070
repo: {type: "model", name: "my-user/nlp-test"},
7171
credentials: {accessToken: HF_ACCESS_TOKEN},
72-
title: "Add model file",
73-
operations: [{
74-
operation: "addOrUpdate",
72+
// Can work with native File in browsers
73+
file: {
7574
path: "pytorch_model.bin",
76-
content: new Blob(...) // Can work with native File in browsers
77-
}]
75+
content: new Blob(...)
76+
}
7877
});
7978

8079
const inference = new HfInference(HF_ACCESS_TOKEN);

‎docs/inference/classes/HfInference.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Recommended model: superb/hubert-large-superb-er
5959

6060
#### Defined in
6161

62-
[HfInference.ts:625](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L625)
62+
[HfInference.ts:737](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L737)
6363

6464
___
6565

@@ -83,7 +83,7 @@ Recommended model (english language): facebook/wav2vec2-large-960h-lv60-self
8383

8484
#### Defined in
8585

86-
[HfInference.ts:611](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L611)
86+
[HfInference.ts:718](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L718)
8787

8888
___
8989

@@ -106,7 +106,7 @@ This task corresponds to any chatbot like structure. Models tend to have shorter
106106

107107
#### Defined in
108108

109-
[HfInference.ts:596](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L596)
109+
[HfInference.ts:688](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L688)
110110

111111
___
112112

@@ -129,7 +129,7 @@ This task reads some text and outputs raw float values, that are usually consume
129129

130130
#### Defined in
131131

132-
[HfInference.ts:603](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L603)
132+
[HfInference.ts:709](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L709)
133133

134134
___
135135

@@ -176,7 +176,7 @@ Recommended model: google/vit-base-patch16-224
176176

177177
#### Defined in
178178

179-
[HfInference.ts:639](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L639)
179+
[HfInference.ts:757](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L757)
180180

181181
___
182182

@@ -200,7 +200,7 @@ Recommended model: facebook/detr-resnet-50-panoptic
200200

201201
#### Defined in
202202

203-
[HfInference.ts:664](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L664)
203+
[HfInference.ts:805](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L805)
204204

205205
___
206206

@@ -224,7 +224,7 @@ Recommended model: facebook/detr-resnet-50
224224

225225
#### Defined in
226226

227-
[HfInference.ts:653](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L653)
227+
[HfInference.ts:777](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L777)
228228

229229
___
230230

@@ -247,7 +247,7 @@ Want to have a nice know-it-all bot that can answer any question?. Recommended m
247247

248248
#### Defined in
249249

250-
[HfInference.ts:535](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L535)
250+
[HfInference.ts:555](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L555)
251251

252252
___
253253

@@ -274,7 +274,7 @@ ___
274274

275275
#### Defined in
276276

277-
[HfInference.ts:682](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L682)
277+
[HfInference.ts:837](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L837)
278278

279279
___
280280

@@ -297,7 +297,7 @@ This task is well known to summarize longer text into shorter text. Be careful,
297297

298298
#### Defined in
299299

300-
[HfInference.ts:528](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L528)
300+
[HfInference.ts:543](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L543)
301301

302302
___
303303

@@ -320,7 +320,7 @@ Don’t know SQL? Don’t want to dive into a large spreadsheet? Ask questions i
320320

321321
#### Defined in
322322

323-
[HfInference.ts:542](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L542)
323+
[HfInference.ts:573](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L573)
324324

325325
___
326326

@@ -343,7 +343,7 @@ Usually used for sentiment-analysis this will output the likelihood of classes o
343343

344344
#### Defined in
345345

346-
[HfInference.ts:552](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L552)
346+
[HfInference.ts:596](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L596)
347347

348348
___
349349

@@ -366,7 +366,7 @@ Use to continue text from a prompt. This is a very generic task. Recommended mod
366366

367367
#### Defined in
368368

369-
[HfInference.ts:559](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L559)
369+
[HfInference.ts:609](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L609)
370370

371371
___
372372

@@ -390,7 +390,7 @@ Recommended model: stabilityai/stable-diffusion-2
390390

391391
#### Defined in
392392

393-
[HfInference.ts:675](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L675)
393+
[HfInference.ts:825](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L825)
394394

395395
___
396396

@@ -413,7 +413,7 @@ Usually used for sentence parsing, either grammatical, or Named Entity Recogniti
413413

414414
#### Defined in
415415

416-
[HfInference.ts:566](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L566)
416+
[HfInference.ts:621](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L621)
417417

418418
___
419419

@@ -436,7 +436,7 @@ This task is well known to translate text from one language to another. Recommen
436436

437437
#### Defined in
438438

439-
[HfInference.ts:576](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L576)
439+
[HfInference.ts:647](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L647)
440440

441441
___
442442

@@ -459,4 +459,4 @@ This task is super useful to try out classification with zero code, you simply p
459459

460460
#### Defined in
461461

462-
[HfInference.ts:583](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L583)
462+
[HfInference.ts:659](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/HfInference.ts#L659)

‎packages/inference/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@huggingface/inference",
3-
"version": "1.6.2",
3+
"version": "1.6.3",
44
"license": "MIT",
55
"author": "Tim Mikeladze <[email protected]>",
66
"description": "Typescript wrapper for the Hugging Face Inference API",

0 commit comments

Comments
 (0)