prithivMLmods commited on
Commit
4f06127
1 Parent(s): 6991f72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -18
app.py CHANGED
@@ -32,27 +32,27 @@ def check_text(prompt, negative=""):
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,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",