@gradio/client 1.19.1 → 2.0.0-dev.0
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/CHANGELOG.md +6 -0
- package/README.md +8 -8
- package/dist/browser.js +741 -889
- package/dist/client.d.ts +0 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/helpers/api_info.d.ts +1 -1
- package/dist/helpers/api_info.d.ts.map +1 -1
- package/dist/helpers/init_helpers.d.ts +1 -1
- package/dist/helpers/init_helpers.d.ts.map +1 -1
- package/dist/helpers/spaces.d.ts +2 -2
- package/dist/helpers/spaces.d.ts.map +1 -1
- package/dist/index.js +53 -266
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/duplicate.d.ts.map +1 -1
- package/dist/utils/submit.d.ts.map +1 -1
- package/dist/utils/view_api.d.ts.map +1 -1
- package/package.json +4 -12
- package/src/client.ts +12 -83
- package/src/helpers/api_info.ts +3 -3
- package/src/helpers/init_helpers.ts +7 -7
- package/src/helpers/spaces.ts +6 -6
- package/src/test/api_info.test.ts +4 -4
- package/src/test/init.test.ts +5 -5
- package/src/test/post_data.test.ts +1 -1
- package/src/test/spaces.test.ts +6 -8
- package/src/test/view_api.test.ts +2 -2
- package/src/types.ts +1 -1
- package/src/utils/duplicate.ts +5 -8
- package/src/utils/post_data.ts +2 -2
- package/src/utils/submit.ts +6 -148
- package/src/utils/upload_files.ts +2 -2
- package/src/utils/view_api.ts +8 -22
- package/dist/wrapper-CpGUsf_3.js +0 -3076
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @gradio/client
|
|
2
2
|
|
|
3
|
+
## 2.0.0-dev.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#11908](https://github.com/gradio-app/gradio/pull/11908) [`53d9098`](https://github.com/gradio-app/gradio/commit/53d9098cca378f6ebff9dec15d2faa8a3d2fb510) - [No Merge] Gradio 6.0. Thanks @freddyaboulton!
|
|
8
|
+
|
|
3
9
|
## 1.19.1
|
|
4
10
|
|
|
5
11
|
### Fixes
|
package/README.md
CHANGED
|
@@ -46,9 +46,9 @@ Client.connect("user/space-name");
|
|
|
46
46
|
|
|
47
47
|
#### `options`
|
|
48
48
|
|
|
49
|
-
The options object can optionally be passed a second parameter. This object has two properties, `
|
|
49
|
+
The options object can optionally be passed a second parameter. This object has two properties, `token` and `status_callback`.
|
|
50
50
|
|
|
51
|
-
##### `
|
|
51
|
+
##### `token`
|
|
52
52
|
|
|
53
53
|
This should be a Hugging Face personal access token and is required if you wish to make calls to a private gradio api. This option is optional and should be a string starting with `"hf_"`.
|
|
54
54
|
|
|
@@ -57,7 +57,7 @@ Example:
|
|
|
57
57
|
```ts
|
|
58
58
|
import { Client } from "@gradio/client";
|
|
59
59
|
|
|
60
|
-
const app = await Client.connect("user/space-name", {
|
|
60
|
+
const app = await Client.connect("user/space-name", { token: "hf_..." });
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
##### `status_callback`
|
|
@@ -267,7 +267,7 @@ The duplicate function will attempt to duplicate the space that is referenced an
|
|
|
267
267
|
import { Client } from "@gradio/client";
|
|
268
268
|
|
|
269
269
|
const app = await Client.duplicate("user/space-name", {
|
|
270
|
-
|
|
270
|
+
token: "hf_..."
|
|
271
271
|
});
|
|
272
272
|
```
|
|
273
273
|
|
|
@@ -279,7 +279,7 @@ The space to duplicate and connect to. [See `client`'s `source` parameter](#sour
|
|
|
279
279
|
|
|
280
280
|
#### `options`
|
|
281
281
|
|
|
282
|
-
Accepts all options that `client` accepts, except `
|
|
282
|
+
Accepts all options that `client` accepts, except `token` is required. [See `client`'s `options` parameter](#source).
|
|
283
283
|
|
|
284
284
|
`duplicate` also accepts one additional `options` property.
|
|
285
285
|
|
|
@@ -291,7 +291,7 @@ This is an optional property specific to `duplicate`'s options object and will d
|
|
|
291
291
|
import { Client } from "@gradio/client";
|
|
292
292
|
|
|
293
293
|
const app = await Client.duplicate("user/space-name", {
|
|
294
|
-
|
|
294
|
+
token: "hf_...",
|
|
295
295
|
private: true
|
|
296
296
|
});
|
|
297
297
|
```
|
|
@@ -304,7 +304,7 @@ This is an optional property specific to `duplicate`'s options object and will s
|
|
|
304
304
|
import { Client } from "@gradio/client";
|
|
305
305
|
|
|
306
306
|
const app = await Client.duplicate("user/space-name", {
|
|
307
|
-
|
|
307
|
+
token: "hf_...",
|
|
308
308
|
private: true,
|
|
309
309
|
timeout: 5
|
|
310
310
|
});
|
|
@@ -334,7 +334,7 @@ Possible hardware options are:
|
|
|
334
334
|
import { Client } from "@gradio/client";
|
|
335
335
|
|
|
336
336
|
const app = await Client.duplicate("user/space-name", {
|
|
337
|
-
|
|
337
|
+
token: "hf_...",
|
|
338
338
|
private: true,
|
|
339
339
|
hardware: "a10g-small"
|
|
340
340
|
});
|