Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -734,8 +734,7 @@ CSS = """
|
|
| 734 |
align-items: flex-end;
|
| 735 |
gap: 32px;
|
| 736 |
flex-wrap: wrap;
|
| 737 |
-
|
| 738 |
-
padding-bottom: 18px;
|
| 739 |
}
|
| 740 |
#hero h1 {
|
| 741 |
font-family: __TITLE_FAMILY__;
|
|
@@ -831,6 +830,20 @@ CSS = """
|
|
| 831 |
.gradio-container .padded, .gradio-container .block { padding: 10px !important; }
|
| 832 |
.gradio-container .block { border-color: var(--hairline) !important; }
|
| 833 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 834 |
/* Status line */
|
| 835 |
.status-line { min-height: 22px; }
|
| 836 |
.status-line p {
|
|
@@ -892,7 +905,7 @@ with gr.Blocks(title="Typotopia", theme=THEME, css=CSS) as demo:
|
|
| 892 |
placeholder="e.g. a bold geometric sans inspired by brutalist concrete signage",
|
| 893 |
lines=2,
|
| 894 |
)
|
| 895 |
-
control_image = gr.Image(label="Control image (optional)", type="pil", height=140)
|
| 896 |
with gr.Row():
|
| 897 |
seed = gr.Number(label="Seed", value=0, precision=0)
|
| 898 |
random_seed = gr.Checkbox(label="Random seed", value=True)
|
|
@@ -900,8 +913,8 @@ with gr.Blocks(title="Typotopia", theme=THEME, css=CSS) as demo:
|
|
| 900 |
with gr.Column(scale=1):
|
| 901 |
gr.HTML("<p class='eyebrow'><span class='idx'>02</span>Specimen</p>")
|
| 902 |
status = gr.HTML(elem_classes=["status-line"])
|
| 903 |
-
otf_file = gr.File(label="Download .otf", height=
|
| 904 |
-
preview = gr.Image(label="Preview", type="pil", height=
|
| 905 |
gallery = gr.Gallery(label="Generated grids", columns=3, height=150, object_fit="contain")
|
| 906 |
|
| 907 |
btn.click(
|
|
|
|
| 734 |
align-items: flex-end;
|
| 735 |
gap: 32px;
|
| 736 |
flex-wrap: wrap;
|
| 737 |
+
padding-bottom: 8px;
|
|
|
|
| 738 |
}
|
| 739 |
#hero h1 {
|
| 740 |
font-family: __TITLE_FAMILY__;
|
|
|
|
| 830 |
.gradio-container .padded, .gradio-container .block { padding: 10px !important; }
|
| 831 |
.gradio-container .block { border-color: var(--hairline) !important; }
|
| 832 |
|
| 833 |
+
/* Control image dropzone — icon only, no instruction text */
|
| 834 |
+
#control-image .wrap {
|
| 835 |
+
font-size: 0 !important;
|
| 836 |
+
line-height: 0 !important;
|
| 837 |
+
gap: 0 !important;
|
| 838 |
+
}
|
| 839 |
+
#control-image .wrap .or { display: none !important; }
|
| 840 |
+
#control-image .wrap svg { width: 28px !important; height: 28px !important; }
|
| 841 |
+
|
| 842 |
+
/* Compact output blocks (download + preview) */
|
| 843 |
+
#otf-file { max-height: 84px !important; overflow: hidden; }
|
| 844 |
+
#otf-file .unpadded_box, #otf-file .empty { min-height: 56px !important; height: 56px !important; }
|
| 845 |
+
#preview-img .unpadded_box, #preview-img .empty { min-height: 96px !important; }
|
| 846 |
+
|
| 847 |
/* Status line */
|
| 848 |
.status-line { min-height: 22px; }
|
| 849 |
.status-line p {
|
|
|
|
| 905 |
placeholder="e.g. a bold geometric sans inspired by brutalist concrete signage",
|
| 906 |
lines=2,
|
| 907 |
)
|
| 908 |
+
control_image = gr.Image(label="Control image (optional)", type="pil", height=140, elem_id="control-image")
|
| 909 |
with gr.Row():
|
| 910 |
seed = gr.Number(label="Seed", value=0, precision=0)
|
| 911 |
random_seed = gr.Checkbox(label="Random seed", value=True)
|
|
|
|
| 913 |
with gr.Column(scale=1):
|
| 914 |
gr.HTML("<p class='eyebrow'><span class='idx'>02</span>Specimen</p>")
|
| 915 |
status = gr.HTML(elem_classes=["status-line"])
|
| 916 |
+
otf_file = gr.File(label="Download .otf", height=56, elem_id="otf-file")
|
| 917 |
+
preview = gr.Image(label="Preview", type="pil", height=110, elem_id="preview-img")
|
| 918 |
gallery = gr.Gallery(label="Generated grids", columns=3, height=150, object_fit="contain")
|
| 919 |
|
| 920 |
btn.click(
|