Spaces:
Configuration error
Configuration error
cocktailpeanut
commited on
Commit
•
b6a29b8
1
Parent(s):
398814f
update
Browse files- pinokio.js +35 -10
pinokio.js
CHANGED
@@ -4,19 +4,44 @@ module.exports = {
|
|
4 |
description: "Limitless Image Editing using Text-to-Image Models",
|
5 |
menu: async (kernel) => {
|
6 |
let installed = await kernel.exists(__dirname, "venv")
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
let session = await kernel.require(__dirname, "session.json")
|
9 |
let running = await kernel.running(__dirname, "start.json")
|
10 |
if (running) {
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
} else {
|
21 |
return [{
|
22 |
icon: "fa-solid fa-power-off",
|
|
|
4 |
description: "Limitless Image Editing using Text-to-Image Models",
|
5 |
menu: async (kernel) => {
|
6 |
let installed = await kernel.exists(__dirname, "venv")
|
7 |
+
let installing = await kernel.running(__dirname, "install.json")
|
8 |
+
if (installing) {
|
9 |
+
return [{
|
10 |
+
icon: "fa-solid fa-plug",
|
11 |
+
text: "Installing",
|
12 |
+
href: "install.json",
|
13 |
+
params: { fullscreen: true }
|
14 |
+
}]
|
15 |
+
} else if (installed) {
|
16 |
let session = await kernel.require(__dirname, "session.json")
|
17 |
let running = await kernel.running(__dirname, "start.json")
|
18 |
if (running) {
|
19 |
+
if (session && session.url) {
|
20 |
+
return [{
|
21 |
+
icon: "fa-solid fa-spin fa-circle-notch",
|
22 |
+
text: "Running"
|
23 |
+
}, {
|
24 |
+
icon: "fa-solid fa-rocket",
|
25 |
+
text: "Open Web UI",
|
26 |
+
href: session.url,
|
27 |
+
target: "_blank"
|
28 |
+
}, {
|
29 |
+
icon: 'fa-solid fa-terminal',
|
30 |
+
text: "Terminal",
|
31 |
+
href: "start.json",
|
32 |
+
params: { fullscreen: true }
|
33 |
+
}]
|
34 |
+
} else {
|
35 |
+
return [{
|
36 |
+
icon: "fa-solid fa-spin fa-circle-notch",
|
37 |
+
text: "Running"
|
38 |
+
}, {
|
39 |
+
icon: 'fa-solid fa-terminal',
|
40 |
+
text: "Terminal",
|
41 |
+
href: "start.json",
|
42 |
+
params: { fullscreen: true }
|
43 |
+
}]
|
44 |
+
}
|
45 |
} else {
|
46 |
return [{
|
47 |
icon: "fa-solid fa-power-off",
|