Spaces:
Paused
Paused
Commit
·
7e7a0ef
1
Parent(s):
1ce1010
Color test
Browse files
app.py
CHANGED
|
@@ -84,7 +84,14 @@ def clear():
|
|
| 84 |
|
| 85 |
theme = gr.themes.Base(primary_hue="teal").set(block_background_fill="#235784",)
|
| 86 |
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
with gr.Row():
|
| 89 |
# gr.HTML(r"""<center><img src='https://user-images.githubusercontent.com/66338785/233529518-33e8bcdb-146f-49e8-94c4-27d6529ce4f7.png' width="30%" height="30%"></center>""")
|
| 90 |
gr.HTML(r"""<center><img src='https://user-images.githubusercontent.com/66338785/233531457-f368e04b-5099-42a8-906d-6f1250ea0f1e.png' width="40%" height="40%"></center>""")
|
|
@@ -156,12 +163,7 @@ with gr.Blocks(theme="base") as demo:
|
|
| 156 |
# Cargar imagen nueva
|
| 157 |
input_file.change(load_img,
|
| 158 |
input_file,
|
| 159 |
-
[original_input_sitk, original_input_img],
|
| 160 |
-
() => {
|
| 161 |
-
document.body.classList.toggle('dark');
|
| 162 |
-
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'
|
| 163 |
-
}
|
| 164 |
-
""")
|
| 165 |
|
| 166 |
# Mostrar imagen nueva
|
| 167 |
load_img_button.click(show_img,
|
|
|
|
| 84 |
|
| 85 |
theme = gr.themes.Base(primary_hue="teal").set(block_background_fill="#235784",)
|
| 86 |
|
| 87 |
+
js="""
|
| 88 |
+
() => {
|
| 89 |
+
document.body.classList.toggle('dark');
|
| 90 |
+
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'
|
| 91 |
+
}
|
| 92 |
+
"""
|
| 93 |
+
|
| 94 |
+
with gr.Blocks(theme="base", _js=js) as demo:
|
| 95 |
with gr.Row():
|
| 96 |
# gr.HTML(r"""<center><img src='https://user-images.githubusercontent.com/66338785/233529518-33e8bcdb-146f-49e8-94c4-27d6529ce4f7.png' width="30%" height="30%"></center>""")
|
| 97 |
gr.HTML(r"""<center><img src='https://user-images.githubusercontent.com/66338785/233531457-f368e04b-5099-42a8-906d-6f1250ea0f1e.png' width="40%" height="40%"></center>""")
|
|
|
|
| 163 |
# Cargar imagen nueva
|
| 164 |
input_file.change(load_img,
|
| 165 |
input_file,
|
| 166 |
+
[original_input_sitk, original_input_img],)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
|
| 168 |
# Mostrar imagen nueva
|
| 169 |
load_img_button.click(show_img,
|