Spaces:
Sleeping
Sleeping
jovian
commited on
Commit
·
f02cbcd
1
Parent(s):
e051a30
theme
Browse files
app.py
CHANGED
|
@@ -401,22 +401,22 @@ header .left a span{
|
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
|
| 414 |
-
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
# Gradio interface components
|
| 419 |
-
with gr.Blocks(css = css) as demo:
|
| 420 |
|
| 421 |
gr.HTML("""
|
| 422 |
<nav>
|
|
|
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
+
js_func = """
|
| 405 |
+
function refresh() {
|
| 406 |
+
const url = new URL(window.location);
|
| 407 |
+
|
| 408 |
+
if (url.searchParams.get('__theme') !== 'light') {
|
| 409 |
+
url.searchParams.set('__theme', 'light');
|
| 410 |
+
window.location.href = url.href;
|
| 411 |
+
}
|
| 412 |
+
}
|
| 413 |
|
| 414 |
+
"""
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
# Gradio interface components
|
| 419 |
+
with gr.Blocks(css = css,js=js_func) as demo:
|
| 420 |
|
| 421 |
gr.HTML("""
|
| 422 |
<nav>
|