Spaces:
Running
on
Zero
Running
on
Zero
download
Browse files
app.py
CHANGED
|
@@ -58,6 +58,10 @@ CUSTOM_CSS = """
|
|
| 58 |
.gradio-container, .gradio-container * {
|
| 59 |
font-family: 'Arial', 'Helvetica', 'Microsoft YaHei', '微软雅黑', sans-serif !important;
|
| 60 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
"""
|
| 62 |
|
| 63 |
# --- Base directory for all models ---
|
|
@@ -130,7 +134,7 @@ def generate_colorbar_preview(color_name):
|
|
| 130 |
rgb[..., 2] = high_half
|
| 131 |
elif color_name == "Cyan Hot":
|
| 132 |
rgb[..., 0] = high_half
|
| 133 |
-
rgb[..., 1] =
|
| 134 |
rgb[..., 2] = low_half
|
| 135 |
elif color_name == "Magenta Hot":
|
| 136 |
rgb[..., 0] = low_half
|
|
@@ -606,7 +610,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=CUSTOM_CSS) as demo:
|
|
| 606 |
t2i_gallery_out = gr.Gallery(label="Generated Images", columns=3, height="auto")
|
| 607 |
with gr.Row(equal_height=True):
|
| 608 |
with gr.Column(scale=2):
|
| 609 |
-
t2i_color = gr.Dropdown(choices=COLOR_MAPS, value="Green (GFP)", label="Pseudocolor (Adjust after generation)")
|
| 610 |
with gr.Column(scale=2):
|
| 611 |
t2i_colorbar = gr.Image(label="Colorbar", show_label=False, container=False, height=40, show_download_button=False, interactive=False)
|
| 612 |
with gr.Column(scale=1):
|
|
@@ -700,7 +704,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=CUSTOM_CSS) as demo:
|
|
| 700 |
m2i_seed = gr.Number(label="Seed", value=42)
|
| 701 |
m2i_btn = gr.Button("Generate", variant="primary")
|
| 702 |
with gr.Column(scale=2):
|
| 703 |
-
m2i_gal_out = gr.Gallery(label="Generated Samples", columns=5, height="auto")
|
| 704 |
with gr.Row(equal_height=True):
|
| 705 |
with gr.Column(scale=2):
|
| 706 |
m2i_color = gr.Dropdown(choices=COLOR_MAPS, value="Grayscale", label="Pseudocolor")
|
|
|
|
| 58 |
.gradio-container, .gradio-container * {
|
| 59 |
font-family: 'Arial', 'Helvetica', 'Microsoft YaHei', '微软雅黑', sans-serif !important;
|
| 60 |
}
|
| 61 |
+
button[aria-label="Download"],
|
| 62 |
+
a[download] {
|
| 63 |
+
display: none !important;
|
| 64 |
+
}
|
| 65 |
"""
|
| 66 |
|
| 67 |
# --- Base directory for all models ---
|
|
|
|
| 134 |
rgb[..., 2] = high_half
|
| 135 |
elif color_name == "Cyan Hot":
|
| 136 |
rgb[..., 0] = high_half
|
| 137 |
+
rgb[..., 1] = high_half
|
| 138 |
rgb[..., 2] = low_half
|
| 139 |
elif color_name == "Magenta Hot":
|
| 140 |
rgb[..., 0] = low_half
|
|
|
|
| 610 |
t2i_gallery_out = gr.Gallery(label="Generated Images", columns=3, height="auto")
|
| 611 |
with gr.Row(equal_height=True):
|
| 612 |
with gr.Column(scale=2):
|
| 613 |
+
t2i_color = gr.Dropdown(choices=COLOR_MAPS, value="Green (GFP)", label="Pseudocolor (Adjust after generation)", show_download_button=False)
|
| 614 |
with gr.Column(scale=2):
|
| 615 |
t2i_colorbar = gr.Image(label="Colorbar", show_label=False, container=False, height=40, show_download_button=False, interactive=False)
|
| 616 |
with gr.Column(scale=1):
|
|
|
|
| 704 |
m2i_seed = gr.Number(label="Seed", value=42)
|
| 705 |
m2i_btn = gr.Button("Generate", variant="primary")
|
| 706 |
with gr.Column(scale=2):
|
| 707 |
+
m2i_gal_out = gr.Gallery(label="Generated Samples", columns=5, height="auto", show_download_button=False)
|
| 708 |
with gr.Row(equal_height=True):
|
| 709 |
with gr.Column(scale=2):
|
| 710 |
m2i_color = gr.Dropdown(choices=COLOR_MAPS, value="Grayscale", label="Pseudocolor")
|