Commit
•
fc00c85
1
Parent(s):
f71f130
Fixing load issue
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ def log_file_to_html_string():
|
|
15 |
|
16 |
return html_content
|
17 |
|
18 |
-
|
|
|
19 |
# body_background_fill="repeating-linear-gradient(45deg, *primary_800, *primary_800 10px, *primary_900 10px, *primary_900 20px)",
|
20 |
# body_background_fill_dark="repeating-linear-gradient(45deg, *primary_800, *primary_800 10px, *primary_900 10px, *primary_900 20px)",
|
21 |
# )
|
@@ -24,19 +25,12 @@ with gr.Blocks() as demo:
|
|
24 |
name = gr.Markdown("# Reddit Scraper")
|
25 |
output = gr.HTML(log_file_to_html_string, every=1)
|
26 |
demo.load(None,
|
27 |
-
|
28 |
() => {
|
29 |
document.body.classList.toggle('dark');
|
30 |
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'
|
31 |
}
|
32 |
-
""",)
|
33 |
|
34 |
if __name__ == '__main__':
|
35 |
-
demo.load(None,
|
36 |
-
_js="""
|
37 |
-
() => {
|
38 |
-
document.body.classList.toggle('dark');
|
39 |
-
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'
|
40 |
-
}
|
41 |
-
""")
|
42 |
demo.launch(server_name="0.0.0.0", show_error=True, server_port=7860, enable_queue=True)
|
|
|
15 |
|
16 |
return html_content
|
17 |
|
18 |
+
|
19 |
+
# theme = gr.themes.Default().set(
|
20 |
# body_background_fill="repeating-linear-gradient(45deg, *primary_800, *primary_800 10px, *primary_900 10px, *primary_900 20px)",
|
21 |
# body_background_fill_dark="repeating-linear-gradient(45deg, *primary_800, *primary_800 10px, *primary_900 10px, *primary_900 20px)",
|
22 |
# )
|
|
|
25 |
name = gr.Markdown("# Reddit Scraper")
|
26 |
output = gr.HTML(log_file_to_html_string, every=1)
|
27 |
demo.load(None,
|
28 |
+
_js="""
|
29 |
() => {
|
30 |
document.body.classList.toggle('dark');
|
31 |
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'
|
32 |
}
|
33 |
+
""", )
|
34 |
|
35 |
if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
demo.launch(server_name="0.0.0.0", show_error=True, server_port=7860, enable_queue=True)
|