-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.js
35 lines (35 loc) · 1.05 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
module.exports = async (kernel) => {
let port = await kernel.port()
return {
daemon: true,
run: [
{
method: "shell.run",
params: {
venv: "env", // Edit this to customize the venv folder path
env: {
SERVER_NAME: "127.0.0.1",
SERVER_PORT: port
},
path: "app", // Edit this to customize the path to start the shell from
message: [
"python gradio_server.py --profile {{args.profile}}", // Edit with your custom commands
],
on: [{
"event": "/http:\/\/[0-9.:]+/",
"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]}}"
}
}
]
}
}