jjin6573 commited on
Commit
795b054
·
verified ·
1 Parent(s): b58e2e5

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +12 -17
app.py CHANGED
@@ -2053,23 +2053,7 @@ button.custom-action-btn:hover,
2053
  }
2054
  """
2055
 
2056
- # JavaScript to force dark mode on page load
2057
- force_dark_mode_js = """
2058
- function() {
2059
- // Force dark mode via URL parameter if not already set
2060
- const url = new URL(window.location);
2061
- if (url.searchParams.get('__theme') !== 'dark') {
2062
- url.searchParams.set('__theme', 'dark');
2063
- window.location.href = url.href;
2064
- }
2065
- // Also add dark class to body as a fallback
2066
- document.body.classList.add('dark');
2067
- // Set data-theme attribute
2068
- document.documentElement.setAttribute('data-theme', 'dark');
2069
- }
2070
- """
2071
-
2072
- with gr.Blocks(js=force_dark_mode_js) as demo:
2073
  # Inject custom CSS and decorative elements (positioned fixed, no DOM space)
2074
  gr.HTML(f"""
2075
  <style>{custom_css}</style>
@@ -2080,6 +2064,17 @@ with gr.Blocks(js=force_dark_mode_js) as demo:
2080
  </svg>
2081
  </div>
2082
  <script>
 
 
 
 
 
 
 
 
 
 
 
2083
  // JavaScript to completely remove upload text from Audio components in demo-row
2084
  function removeAudioUploadText() {{
2085
  // Find all audio components in demo-row
 
2053
  }
2054
  """
2055
 
2056
+ with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2057
  # Inject custom CSS and decorative elements (positioned fixed, no DOM space)
2058
  gr.HTML(f"""
2059
  <style>{custom_css}</style>
 
2064
  </svg>
2065
  </div>
2066
  <script>
2067
+ // Force dark mode on page load
2068
+ (function() {
2069
+ const url = new URL(window.location);
2070
+ if (url.searchParams.get('__theme') !== 'dark') {
2071
+ url.searchParams.set('__theme', 'dark');
2072
+ window.location.href = url.href;
2073
+ }
2074
+ document.body.classList.add('dark');
2075
+ document.documentElement.setAttribute('data-theme', 'dark');
2076
+ })();
2077
+
2078
  // JavaScript to completely remove upload text from Audio components in demo-row
2079
  function removeAudioUploadText() {{
2080
  // Find all audio components in demo-row