Spaces:
Running
Running
yizhangliu
commited on
Commit
·
40b797f
1
Parent(s):
f530ecb
Update index.html
Browse files- index.html +7 -1
index.html
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
"name": "textbox", "visible": true, "elem_id": "prompt", "style": {"container": false}}},
|
24 |
{"id": 8, "type": "button", "props": {"value": "Run", "variant": "primary", "name": "button", "visible": true, "style": {}}},
|
25 |
{"id": 9, "type": "gallery", "props": {"label": "Generated images", "show_label": false,
|
26 |
-
"name": "gallery", "visible": true, "elem_id": "gallery", "style": {"grid": [
|
27 |
{"id": 10, "type": "column", "props": {"type": "column", "variant": "default", "visible": true, "style": {}}},
|
28 |
{"id": 11, "type": "button", "props": {"value": "Screenshot", "variant": "secondary",
|
29 |
"name": "button", "visible": true, "elem_id": "screenshot", "style": {"full_width": true}}},
|
@@ -118,6 +118,12 @@
|
|
118 |
ele.style.display = "none";
|
119 |
}
|
120 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
var prompt = decodeURI(getParamVal("prompt"));
|
122 |
window['checkPrompt'] = function checkPrompt() {
|
123 |
try {
|
|
|
23 |
"name": "textbox", "visible": true, "elem_id": "prompt", "style": {"container": false}}},
|
24 |
{"id": 8, "type": "button", "props": {"value": "Run", "variant": "primary", "name": "button", "visible": true, "style": {}}},
|
25 |
{"id": 9, "type": "gallery", "props": {"label": "Generated images", "show_label": false,
|
26 |
+
"name": "gallery", "visible": true, "elem_id": "gallery", "style": {"grid": [2], "height": "auto"}}},
|
27 |
{"id": 10, "type": "column", "props": {"type": "column", "variant": "default", "visible": true, "style": {}}},
|
28 |
{"id": 11, "type": "button", "props": {"value": "Screenshot", "variant": "secondary",
|
29 |
"name": "button", "visible": true, "elem_id": "screenshot", "style": {"full_width": true}}},
|
|
|
118 |
ele.style.display = "none";
|
119 |
}
|
120 |
}
|
121 |
+
function showElement(id) {
|
122 |
+
let ele = document.querySelector(id);
|
123 |
+
if (ele) {
|
124 |
+
ele.style.display = "block";
|
125 |
+
}
|
126 |
+
}
|
127 |
var prompt = decodeURI(getParamVal("prompt"));
|
128 |
window['checkPrompt'] = function checkPrompt() {
|
129 |
try {
|