pnnbao-ump commited on
Commit
3ee5ad8
·
1 Parent(s): ed4e7b9

first init

Browse files
Files changed (1) hide show
  1. app.py +17 -6
app.py CHANGED
@@ -431,12 +431,23 @@ footer { visibility: hidden }
431
  }
432
  """
433
 
434
- with gr.Blocks(theme=gr.themes.Default(primary_hue="purple", secondary_hue="blue").set(
435
- body_background_fill="*neutral_950",
436
- body_background_fill_dark="*neutral_950",
437
- button_primary_background_fill="*primary_500",
438
- button_primary_background_fill_hover="*primary_600",
439
- ), css=css, title="🦀 MedCrab Translation") as demo:
 
 
 
 
 
 
 
 
 
 
 
440
 
441
  gr.Markdown("""
442
  <div class="main-title">
 
431
  }
432
  """
433
 
434
+ # JavaScript to force dark mode
435
+ js = """
436
+ function() {
437
+ // Force dark mode
438
+ const rootEl = document.querySelector('gradio-app');
439
+ if (rootEl && rootEl.shadowRoot) {
440
+ const container = rootEl.shadowRoot.querySelector('.gradio-container');
441
+ if (container) {
442
+ container.classList.add('dark');
443
+ }
444
+ }
445
+ // Also try direct approach
446
+ document.body.classList.add('dark');
447
+ }
448
+ """
449
+
450
+ with gr.Blocks(theme=gr.themes.Soft(), css=css, js=js, title="🦀 MedCrab Translation") as demo:
451
 
452
  gr.Markdown("""
453
  <div class="main-title">