Hermes Bot commited on
Commit
722713d
·
1 Parent(s): 2660a46

Restore control buttons and layout for Gallery tab with metadata textbox

Browse files
Files changed (1) hide show
  1. ui/layout.py +10 -6
ui/layout.py CHANGED
@@ -99,12 +99,16 @@ def build_ui(event_handler_function):
99
  refresh_btn = gr.Button("Refresh Gallery", variant="secondary")
100
  clear_btn = gr.Button("Clear Gallery", variant="secondary")
101
  download_btn = gr.Button("Download All", variant="secondary")
102
- # Main gallery component.
103
- gallery = gr.Gallery(label="Generated Images", show_label=False, columns=4, height="auto", type="filepath")
104
- ui_components["gallery"] = gallery
105
- # Textbox to show generation info for selected image.
106
- metadata_box = gr.Textbox(label="Generation info", lines=4, interactive=False)
107
- ui_components["gallery_metadata"] = metadata_box
 
 
 
 
108
  # Hidden file component for zip download.
109
  download_file = gr.File(label="Download", visible=False)
110
  # Bind buttons.
 
99
  refresh_btn = gr.Button("Refresh Gallery", variant="secondary")
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
  # Hidden file component for zip download.
113
  download_file = gr.File(label="Download", visible=False)
114
  # Bind buttons.