Dejansimic commited on
Commit
93bf38c
·
verified ·
1 Parent(s): 24504c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -150,11 +150,16 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
150
 
151
  with gr.Column():
152
  status = gr.Textbox(label="Status", visible=True)
 
 
153
  gallery = gr.Gallery(
154
  label="Extracted Pages",
155
  show_label=True,
156
- elem_id="gallery"
157
- ).style(columns=[3], object_fit="contain", height="auto")
 
 
 
158
  download_btn = gr.File(
159
  label="Download All Images (ZIP)",
160
  visible=False
@@ -189,4 +194,4 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
189
  )
190
 
191
  if __name__ == "__main__":
192
- demo.queue().launch(ssr=False)
 
150
 
151
  with gr.Column():
152
  status = gr.Textbox(label="Status", visible=True)
153
+ # Opraveno: V novějších verzích Gradio, Gallery nemá metodu style
154
+ # Místo toho nastavujeme parametry přímo při vytváření
155
  gallery = gr.Gallery(
156
  label="Extracted Pages",
157
  show_label=True,
158
+ elem_id="gallery",
159
+ columns=3,
160
+ object_fit="contain",
161
+ height="auto"
162
+ )
163
  download_btn = gr.File(
164
  label="Download All Images (ZIP)",
165
  visible=False
 
194
  )
195
 
196
  if __name__ == "__main__":
197
+ demo.launch()