Hermes Bot commited on
Commit ·
db3b582
1
Parent(s): 6b891b0
Rearrange Gallery layout: left gallery, right info+drop, match column widths
Browse files- ui/layout.py +11 -10
ui/layout.py
CHANGED
|
@@ -100,16 +100,17 @@ def build_ui(event_handler_function):
|
|
| 100 |
clear_btn = gr.Button("Clear Gallery", variant="secondary")
|
| 101 |
download_btn = gr.Button("Download All", variant="secondary")
|
| 102 |
# Gallery and metadata side by side.
|
| 103 |
-
with gr.
|
| 104 |
-
#
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
|
|
|
| 113 |
# Hidden file component for zip download.
|
| 114 |
download_file = gr.File(label="Download", visible=False)
|
| 115 |
# Bind buttons.
|
|
|
|
| 100 |
clear_btn = gr.Button("Clear Gallery", variant="secondary")
|
| 101 |
download_btn = gr.Button("Download All", variant="secondary")
|
| 102 |
# Gallery and metadata side by side.
|
| 103 |
+
with gr.Row():
|
| 104 |
+
# Left side: Gallery (larger column)
|
| 105 |
+
with gr.Column(scale=3):
|
| 106 |
+
gallery = gr.Gallery(label="Generated Images", show_label=False, columns=4, height="auto", type="filepath")
|
| 107 |
+
ui_components["gallery"] = gallery
|
| 108 |
+
# Right side: Metadata textbox + drag‑and‑drop (smaller column)
|
| 109 |
+
with gr.Column(scale=1):
|
| 110 |
+
metadata_box = gr.Textbox(label="Generation info", lines=4, interactive=False)
|
| 111 |
+
ui_components["gallery_metadata"] = metadata_box
|
| 112 |
+
info_upload = gr.File(label="Drag image here for info", file_count="single", type="filepath", interactive=True)
|
| 113 |
+
ui_components["info_upload"] = info_upload
|
| 114 |
# Hidden file component for zip download.
|
| 115 |
download_file = gr.File(label="Download", visible=False)
|
| 116 |
# Bind buttons.
|