Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ demo = gr.Interface(
|
|
22 |
title="Web(GPT)3"
|
23 |
)
|
24 |
|
25 |
-
function
|
26 |
let url = new URL(window.location.toString());
|
27 |
|
28 |
|
@@ -33,13 +33,13 @@ function handle_darkmode() {
|
|
33 |
|
34 |
if (color_mode !== null) {
|
35 |
if (color_mode === "light") {
|
36 |
-
|
37 |
} else if (color_mode === "system") {
|
38 |
use_system_theme();
|
39 |
}
|
40 |
// light is default, so we don't need to do anything else
|
41 |
} else if (url.searchParams.get("__light-theme") === "true") {
|
42 |
-
|
43 |
} else {
|
44 |
use_system_theme();
|
45 |
}
|
|
|
22 |
title="Web(GPT)3"
|
23 |
)
|
24 |
|
25 |
+
function handle_lightmode() {
|
26 |
let url = new URL(window.location.toString());
|
27 |
|
28 |
|
|
|
33 |
|
34 |
if (color_mode !== null) {
|
35 |
if (color_mode === "light") {
|
36 |
+
lightmode();
|
37 |
} else if (color_mode === "system") {
|
38 |
use_system_theme();
|
39 |
}
|
40 |
// light is default, so we don't need to do anything else
|
41 |
} else if (url.searchParams.get("__light-theme") === "true") {
|
42 |
+
lightmode();
|
43 |
} else {
|
44 |
use_system_theme();
|
45 |
}
|