Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -220,20 +220,16 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty', fill_width=True, css=CSS)
|
|
| 220 |
o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
|
| 221 |
#stop_button2.click(lambda: gr.update(interactive=False), None, stop_button2, cancels=[gen_event2])
|
| 222 |
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
}
|
| 231 |
}
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
with gr.Blocks() as demo:
|
| 236 |
-
gr.Markdown("<script>" + makeItDark + "</script>")
|
| 237 |
|
| 238 |
#demo.queue(default_concurrency_limit=200, max_size=200)
|
| 239 |
demo.launch(show_api=False, max_threads=400)
|
|
|
|
| 220 |
o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
|
| 221 |
#stop_button2.click(lambda: gr.update(interactive=False), None, stop_button2, cancels=[gen_event2])
|
| 222 |
|
| 223 |
+
makeItDark = """
|
| 224 |
+
function refresh() {
|
| 225 |
+
const url = new URL(window.location);
|
| 226 |
+
|
| 227 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
| 228 |
+
url.searchParams.set('__theme', 'dark');
|
| 229 |
+
window.location.href = url.href;
|
|
|
|
| 230 |
}
|
| 231 |
+
}
|
| 232 |
+
"""
|
|
|
|
|
|
|
|
|
|
| 233 |
|
| 234 |
#demo.queue(default_concurrency_limit=200, max_size=200)
|
| 235 |
demo.launch(show_api=False, max_threads=400)
|