-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.js
44 lines (43 loc) · 1.52 KB
/
start.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
39
40
41
42
43
44
module.exports = {
daemon: true,
run: [
{
method: "shell.run",
params: {
venv: "../env", // Edit this to customize the venv folder path
env: { }, // Edit this to customize environment variables (see documentation)
path: "app/inference", // Edit this to customize the path to start the shell from
message: [
`python infer.py
--stage1_model m-a-p/YuE-s1-7B-anneal-en-cot
--stage2_model m-a-p/YuE-s2-1B-general
--genre_txt prompt_examples/genre.txt
--lyrics_txt prompt_examples/lyrics.txt
--run_n_segments 2
--stage2_batch_size 4
--output_dir ./output
--cuda_idx 0
--max_new_tokens 3000`
],
on: [{
// The regular expression pattern to monitor.
// When this pattern occurs in the shell terminal, the shell will return,
// and the script will go onto the next step.
"event": "/http:\/\/\\S+/",
// "done": true will move to the next step while keeping the shell alive.
// "kill": true will move to the next step after killing the shell.
"done": true
}]
}
},
{
// This step sets the local variable 'url'.
// This local variable will be used in pinokio.js to display the "Open WebUI" tab when the value is set.
method: "local.set",
params: {
// the input.event is the regular expression match object from the previous step
url: "{{input.event[0]}}"
}
}
]
}