Skip to content

Commit cd400cd

Browse files
committed
Formatting
1 parent 1c3c0b3 commit cd400cd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ const replicate = new Replicate({
3434
Run a model and await the result:
3535

3636
```js
37-
const model = "stability-ai/stable-diffusion:27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478";
38-
const input = { prompt: "a 19th century portrait of a raccoon gentleman wearing a suit" };
37+
const model =
38+
"stability-ai/stable-diffusion:27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478";
39+
const input = {
40+
prompt: "a 19th century portrait of a raccoon gentleman wearing a suit",
41+
};
3942
const output = await replicate.run(model, { input });
4043
// ['https://replicate.delivery/pbxt/GtQb3Sgve42ZZyVnt8xjquFk9EX5LP0fF68NTIWlgBMUpguQA/out-0.png']
4144
```
@@ -61,7 +64,7 @@ Or wait for the prediction to finish:
6164

6265
```js
6366
prediction = await replicate.wait(prediction);
64-
console.log(prediction.output)
67+
console.log(prediction.output);
6568
// ['https://replicate.delivery/pbxt/RoaxeXqhL0xaYyLm6w3bpGwF5RaNBjADukfFnMbhOyeoWBdhA/out-0.png']
6669
```
6770

@@ -97,12 +100,12 @@ and pass it to the `fetch` option in the constructor.
97100

98101
```js
99102
import Replicate from "replicate";
100-
import fetch from 'cross-fetch';
103+
import fetch from "cross-fetch";
101104

102105
const replicate = new Replicate({
103106
// get your token from https://replicate.com/account
104107
auth: process.env.REPLICATE_API_TOKEN,
105-
fetch: fetch
108+
fetch: fetch,
106109
});
107110
```
108111

0 commit comments

Comments
 (0)