-
Notifications
You must be signed in to change notification settings - Fork 0
/
create.js
38 lines (29 loc) · 942 Bytes
/
create.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import {EdenClient} from "eden-sdk";
const eden = new EdenClient();
eden.loginApi(
"afb9da36e8b2e9143afd6479b0c43b033bf2f17fa4bf9a48", "2c6cb1042e90fed840a5f3a4d7b88ba233a8be6a7e9e5817"
)
let manna = await eden.getManna();
console.log(manna);
let config = {
text_input: "An astronaut on the moon riding a horse, cartoon 1920s",
width: 768,
height: 512
}
let config2 = {
interpolation_texts: [
"An astronaut on the moon riding a horse, cartoon 1920s",
"A cat and a dog sitting on a couch"
],
n_frames: 6,
stream: true,
}
// let result = await eden.create("create", config2);
let result = await eden.create("interpolate", config2);
console.log(result);
manna = await eden.getManna();
console.log(manna);
/* Alternatively, start the prediction asynchronously and poll for the result */
//let taskId = await eden.startTask("create", config);
//let result = await eden.getTaskStatus(taskId);
//console.log(result);