Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -32,27 +32,27 @@ def check_text(prompt, negative=""):
|
|
32 |
|
33 |
|
34 |
|
35 |
-
js_func = """
|
36 |
|
37 |
-
|
38 |
-
(function() {
|
39 |
-
const url = new URL(window.location);
|
40 |
-
const currentTheme = url.searchParams.get('__theme');
|
41 |
|
42 |
-
|
43 |
-
url.searchParams.set('__theme', 'dark');
|
44 |
-
|
45 |
-
applyDarkTheme();
|
46 |
}
|
47 |
-
})();
|
48 |
|
49 |
-
function applyDarkTheme() {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
"""
|
56 |
|
57 |
|
58 |
style_list = [
|
@@ -330,7 +330,8 @@ css = '''
|
|
330 |
.gradio-container{max-width: 640px !important}
|
331 |
h1{text-align:center}
|
332 |
'''
|
333 |
-
with gr.Blocks(css=css, theme="bethecloud/storj_theme", js=js_func) as demo:
|
|
|
334 |
gr.Markdown(DESCRIPTION)
|
335 |
gr.DuplicateButton(
|
336 |
value="Duplicate Space for private use",
|
|
|
32 |
|
33 |
|
34 |
|
35 |
+
#js_func = """
|
36 |
|
37 |
+
#<script>
|
38 |
+
#(function() {
|
39 |
+
# const url = new URL(window.location);
|
40 |
+
# const currentTheme = url.searchParams.get('__theme');
|
41 |
|
42 |
+
# if (currentTheme !== 'dark') {
|
43 |
+
# url.searchParams.set('__theme', 'dark');
|
44 |
+
# history.pushState({}, '', url.href);
|
45 |
+
# applyDarkTheme();
|
46 |
}
|
47 |
+
#})();
|
48 |
|
49 |
+
#function applyDarkTheme() {
|
50 |
+
# // Example: Apply dark theme styles to body or specific elements
|
51 |
+
# document.body.classList.add('dark-theme');
|
52 |
+
# // Additional logic as needed
|
53 |
+
#}
|
54 |
+
#</script>
|
55 |
+
#"""
|
56 |
|
57 |
|
58 |
style_list = [
|
|
|
330 |
.gradio-container{max-width: 640px !important}
|
331 |
h1{text-align:center}
|
332 |
'''
|
333 |
+
#with gr.Blocks(css=css, theme="bethecloud/storj_theme", js=js_func) as demo:
|
334 |
+
with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
335 |
gr.Markdown(DESCRIPTION)
|
336 |
gr.DuplicateButton(
|
337 |
value="Duplicate Space for private use",
|