Skip to content

Commit 9f0fe39

Browse files
authored
small fixes (#9347)
1 parent 81a1132 commit 9f0fe39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

guides/08_gradio-clients-and-lite/02_getting-started-with-the-js-client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ Start by connecting instantiating a `client` instance and connecting it to a Gra
5858
```js
5959
import { Client } from "@gradio/client";
6060

61-
const app = Client.connect("abidlabs/en2fr"); // a Space that translates from English to French
61+
const app = await Client.connect("abidlabs/en2fr"); // a Space that translates from English to French
6262
```
6363

6464
You can also connect to private Spaces by passing in your HF token with the `hf_token` property of the options parameter. You can get your HF token here: https://huggingface.co/settings/tokens
6565

6666
```js
6767
import { Client } from "@gradio/client";
6868

69-
const app = Client.connect("abidlabs/my-private-space", { hf_token: "hf_..." })
69+
const app = await Client.connect("abidlabs/my-private-space", { hf_token: "hf_..." })
7070
```
7171

7272
## Duplicating a Space for private use
@@ -216,7 +216,7 @@ const result = await app.predict("/predict", [handle_file(audio_file)]);
216216

217217
## Using events
218218

219-
If the API you are working with can return results over time, or you wish to access information about the status of a job, you can use the iterable interface for more flexibility. This is especially useful for iterative endpoints or generator endpoints that will produce a series of values over time as discreet responses.
219+
If the API you are working with can return results over time, or you wish to access information about the status of a job, you can use the iterable interface for more flexibility. This is especially useful for iterative endpoints or generator endpoints that will produce a series of values over time as discrete responses.
220220

221221
```js
222222
import { Client } from "@gradio/client";

0 commit comments

Comments
 (0)