Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -222,18 +222,18 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty', fill_width=True, css=CSS)
|
|
| 222 |
|
| 223 |
gr.Markdown("")
|
| 224 |
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
}
|
| 233 |
}
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
|
|
|
| 237 |
|
| 238 |
-
#demo.queue(default_concurrency_limit=200, max_size=200)
|
| 239 |
-
demo.launch(show_api=False, max_threads=400)
|
|
|
|
| 222 |
|
| 223 |
gr.Markdown("")
|
| 224 |
|
| 225 |
+
js_func = """
|
| 226 |
+
function refresh() {
|
| 227 |
+
const url = new URL(window.location);
|
| 228 |
+
|
| 229 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
| 230 |
+
url.searchParams.set('__theme', 'dark');
|
| 231 |
+
window.location.href = url.href;
|
|
|
|
| 232 |
}
|
| 233 |
+
}
|
| 234 |
+
"""
|
| 235 |
+
|
| 236 |
+
with gr.Blocks(js=js_func) as demo:
|
| 237 |
|
| 238 |
+
#demo.queue(default_concurrency_limit=200, max_size=200)
|
| 239 |
+
demo.launch(show_api=False, max_threads=400)
|