Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
3ee5ad8
1
Parent(s):
ed4e7b9
first init
Browse files
app.py
CHANGED
|
@@ -431,12 +431,23 @@ footer { visibility: hidden }
|
|
| 431 |
}
|
| 432 |
"""
|
| 433 |
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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">
|