gyasca commited on
Commit
c19de3d
·
1 Parent(s): c5b4761

file preview update final

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -149,17 +149,16 @@ with gr.Blocks() as demo:
149
  height=200
150
  )
151
  gr.Markdown("*You can upload a single image or multiple images at once*")
152
- with gr.Box():
153
- file_preview = gr.Gallery(
154
- label="Preview",
155
- show_label=True,
156
- columns=2,
157
- rows=2,
158
- height="400px",
159
- object_fit="contain",
160
- allow_preview=True,
161
- elem_class="scrollable-gallery"
162
- )
163
 
164
  def update_preview(files):
165
  if not files or len(files) == 0:
 
149
  height=200
150
  )
151
  gr.Markdown("*You can upload a single image or multiple images at once*")
152
+ file_preview = gr.Gallery(
153
+ label="Preview",
154
+ show_label=True,
155
+ columns=2,
156
+ height="300px", # Use px to enforce fixed height
157
+ allow_preview=True, # Enable preview mode
158
+ show_share_button=False, # Hide share button for cleaner look
159
+ container=True, # Enable container mode for scrolling
160
+ elem_id="preview-gallery" # Add ID for potential custom styling
161
+ )
 
162
 
163
  def update_preview(files):
164
  if not files or len(files) == 0: