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

Adjust Gallery UI: full-width gallery, stacked metadata and drag‑and‑drop, enable overwrite

Browse files
Files changed (1) hide show
  1. ui/layout.py +10 -12
ui/layout.py CHANGED
@@ -100,18 +100,16 @@ 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.Row():
104
- with gr.Column(scale=3):
105
- # Main gallery component.
106
- gallery = gr.Gallery(label="Generated Images", show_label=False, columns=4, height="auto", type="filepath")
107
- ui_components["gallery"] = gallery
108
- with gr.Column(scale=1):
109
- # Textbox to show generation info for selected image.
110
- metadata_box = gr.Textbox(label="Generation info", lines=4, interactive=False)
111
- ui_components["gallery_metadata"] = metadata_box
112
- # Drag-and-drop file component for extracting generation info.
113
- info_upload = gr.File(label="Drag image here for info", file_count="single", type="filepath")
114
- ui_components["info_upload"] = info_upload
115
  # Hidden file component for zip download.
116
  download_file = gr.File(label="Download", visible=False)
117
  # 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.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.