Enable dark mode
Browse files
app.py
CHANGED
|
@@ -143,13 +143,13 @@ footer_html="""
|
|
| 143 |
<h3 style="text-align: center"><i>Powered by:</i></h2>
|
| 144 |
<div class="logo-container">
|
| 145 |
<a class="logo-item" href="https://github.com/e2b-dev/desktop">
|
| 146 |
-
<img src="https://image.pitchbook.com/XcarTFiUTDTVBfBep3JKHtiTAob1714067332850_200x200" alt="e2b logo"
|
| 147 |
</a>
|
| 148 |
<a class="logo-item" href="https://github.com/huggingface/smolagents">
|
| 149 |
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/smolagents.png" alt="Smolagents logo">
|
| 150 |
</a>
|
| 151 |
<a class="logo-item" href="https://huggingface.co/Qwen/Qwen2.5-VL-32B-Instruct">
|
| 152 |
-
<img src="https://upload.wikimedia.org/wikipedia/en/8/85/Logo_of_Qwen.png" alt="Qwen logo"
|
| 153 |
</a>
|
| 154 |
</div>
|
| 155 |
"""
|
|
@@ -174,7 +174,7 @@ sandbox_html_template = """
|
|
| 174 |
""".replace("<<WIDTH>>", str(WIDTH+15)).replace("<<HEIGHT>>", str(HEIGHT+10))
|
| 175 |
|
| 176 |
custom_js = """function() {
|
| 177 |
-
document.body.classList.
|
| 178 |
|
| 179 |
// Function to check if sandbox is timing out
|
| 180 |
const checkSandboxTimeout = function() {
|
|
@@ -702,11 +702,6 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, fill_width=True) as de
|
|
| 702 |
fn=initialize_session,
|
| 703 |
inputs=[is_interactive],
|
| 704 |
outputs=[sandbox_html, session_hash_state],
|
| 705 |
-
js="""
|
| 706 |
-
() => {
|
| 707 |
-
document.body.classList.toggle('dark');
|
| 708 |
-
}
|
| 709 |
-
""",
|
| 710 |
)
|
| 711 |
|
| 712 |
# Launch the app
|
|
|
|
| 143 |
<h3 style="text-align: center"><i>Powered by:</i></h2>
|
| 144 |
<div class="logo-container">
|
| 145 |
<a class="logo-item" href="https://github.com/e2b-dev/desktop">
|
| 146 |
+
<img src="https://image.pitchbook.com/XcarTFiUTDTVBfBep3JKHtiTAob1714067332850_200x200" alt="e2b logo">
|
| 147 |
</a>
|
| 148 |
<a class="logo-item" href="https://github.com/huggingface/smolagents">
|
| 149 |
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/smolagents.png" alt="Smolagents logo">
|
| 150 |
</a>
|
| 151 |
<a class="logo-item" href="https://huggingface.co/Qwen/Qwen2.5-VL-32B-Instruct">
|
| 152 |
+
<img src="https://upload.wikimedia.org/wikipedia/en/8/85/Logo_of_Qwen.png" alt="Qwen logo">
|
| 153 |
</a>
|
| 154 |
</div>
|
| 155 |
"""
|
|
|
|
| 174 |
""".replace("<<WIDTH>>", str(WIDTH+15)).replace("<<HEIGHT>>", str(HEIGHT+10))
|
| 175 |
|
| 176 |
custom_js = """function() {
|
| 177 |
+
document.body.classList.add('dark');
|
| 178 |
|
| 179 |
// Function to check if sandbox is timing out
|
| 180 |
const checkSandboxTimeout = function() {
|
|
|
|
| 702 |
fn=initialize_session,
|
| 703 |
inputs=[is_interactive],
|
| 704 |
outputs=[sandbox_html, session_hash_state],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 705 |
)
|
| 706 |
|
| 707 |
# Launch the app
|