Spaces:
Running
Running
fix: Gallery
Browse files
app.py
CHANGED
@@ -121,9 +121,13 @@ with gr.Blocks() as demo:
|
|
121 |
image_gallery = gr.Gallery(
|
122 |
label="PDF页面预览",
|
123 |
columns=3,
|
124 |
-
height=
|
125 |
-
object_fit="contain",
|
126 |
-
preview=True,
|
|
|
|
|
|
|
|
|
127 |
)
|
128 |
selected_index = gr.State(None)
|
129 |
pdf_input.upload(fn=process_pdf, inputs=pdf_input, outputs=image_gallery)
|
|
|
121 |
image_gallery = gr.Gallery(
|
122 |
label="PDF页面预览",
|
123 |
columns=3,
|
124 |
+
height=600,
|
125 |
+
object_fit="contain",
|
126 |
+
preview=True,
|
127 |
+
zoom=True, # 启用缩放功能
|
128 |
+
show_download_button=True, # 显示下载按钮
|
129 |
+
show_fullscreen_button=True, # 显示全屏按钮
|
130 |
+
allow_preview=True, # 允许预览(包括全屏查看)
|
131 |
)
|
132 |
selected_index = gr.State(None)
|
133 |
pdf_input.upload(fn=process_pdf, inputs=pdf_input, outputs=image_gallery)
|