Spaces:
Runtime error
Runtime error
Linoy Tsaban
commited on
Commit
·
7aa699b
1
Parent(s):
1b706f6
Update app.py
Browse files
app.py
CHANGED
@@ -399,6 +399,18 @@ with gr.Blocks(css="style.css") as demo:
|
|
399 |
queue=False
|
400 |
)
|
401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
|
403 |
demo.queue()
|
404 |
demo.launch()
|
|
|
399 |
queue=False
|
400 |
)
|
401 |
|
402 |
+
demo.load(None,
|
403 |
+
_js="""async () => {
|
404 |
+
let gradioURL = new URL(window.self.location.href);
|
405 |
+
let params = new URLSearchParams(gradioURL.search);
|
406 |
+
|
407 |
+
if (!params.has('__theme') || params.get('__theme') !== 'dark') {
|
408 |
+
params.set('__theme', 'dark');
|
409 |
+
gradioURL.search = params.toString();
|
410 |
+
window.self.location.replace(gradioURL.toString());
|
411 |
+
}
|
412 |
+
}""")
|
413 |
+
|
414 |
|
415 |
demo.queue()
|
416 |
demo.launch()
|