-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.js
More file actions
34 lines (34 loc) · 897 Bytes
/
Copy pathstart.js
File metadata and controls
34 lines (34 loc) · 897 Bytes
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
module.exports = async (kernel) => {
const port = await kernel.port()
return {
daemon: true,
run: [
{
method: "shell.run",
params: {
venv: "env",
venv_python: "3.12",
path: "app",
env: {
GRADIO_SERVER_PORT: `${port}`,
NO_AUTO_BROWSER: "true",
HF_HOME: "{{path.resolve(cwd,'app/models')}}",
HUGGINGFACE_HUB_CACHE: "{{path.resolve(cwd,'app/models')}}",
TRANSFORMERS_CACHE: "{{path.resolve(cwd,'app/models')}}",
PYTHONIOENCODING: "utf-8",
PYTHONUNBUFFERED: "1"
},
message: ["python app.py"],
on: [{
event: "/(https?:\\/\\/[0-9.:]+:[0-9]+)/",
done: true
}]
}
},
{
method: "local.set",
params: { url: "{{input.event[1]}}" }
}
]
}
}