Create config.json
Browse files- config.json +17 -0
config.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
let job = await createJob({
|
2 |
+
prompt: "puppies in a cloud, 4k",
|
3 |
+
});
|
4 |
+
|
5 |
+
console.log("Job Created! Waiting...");
|
6 |
+
|
7 |
+
while (job.status !== "succeeded" && job.status !== "failed") {
|
8 |
+
await new Promise((resolve) => setTimeout(resolve, 250));
|
9 |
+
|
10 |
+
job = await getJob(job.job);
|
11 |
+
}
|
12 |
+
|
13 |
+
if(job.status !== "succeeded") {
|
14 |
+
throw new Error("Job failed!");
|
15 |
+
}
|
16 |
+
|
17 |
+
console.log("Generation completed!", job.imageUrl);
|