Hermes Bot commited on
Commit
db3b582
·
1 Parent(s): 6b891b0

Rearrange Gallery layout: left gallery, right info+drop, match column widths

Browse files
Files changed (1) hide show
  1. 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.Column(scale=1):
104
- # Main gallery component (full width).
105
- gallery = gr.Gallery(label="Generated Images", show_label=False, columns=4, height="auto", type="filepath")
106
- ui_components["gallery"] = gallery
107
- # Textbox to show generation info for selected image.
108
- metadata_box = gr.Textbox(label="Generation info", lines=4, interactive=False)
109
- ui_components["gallery_metadata"] = metadata_box
110
- # Drag-and-drop file component for extracting generation info (replace previous upload automatically).
111
- info_upload = gr.File(label="Drag image here for info", file_count="single", type="filepath", interactive=True)
112
- ui_components["info_upload"] = info_upload
 
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.