@@ -204,22 +204,22 @@ def page_count(pdf_file):
204
204
if text_det :
205
205
det_img , pred = text_detection (pil_image )
206
206
with col1 :
207
- st .image (det_img , caption = "Detected Text" , use_column_width = True )
207
+ st .image (det_img , caption = "Detected Text" , use_container_width = True )
208
208
st .json (pred .model_dump (exclude = ["heatmap" , "affinity_map" ]), expanded = True )
209
209
210
210
211
211
# Run layout
212
212
if layout_det :
213
213
layout_img , pred = layout_detection (pil_image )
214
214
with col1 :
215
- st .image (layout_img , caption = "Detected Layout" , use_column_width = True )
215
+ st .image (layout_img , caption = "Detected Layout" , use_container_width = True )
216
216
st .json (pred .model_dump (exclude = ["segmentation_map" ]), expanded = True )
217
217
218
218
# Run OCR
219
219
if text_rec :
220
220
rec_img , pred = ocr (pil_image , pil_image_highres , languages )
221
221
with col1 :
222
- st .image (rec_img , caption = "OCR Result" , use_column_width = True )
222
+ st .image (rec_img , caption = "OCR Result" , use_container_width = True )
223
223
json_tab , text_tab = st .tabs (["JSON" , "Text Lines (for debugging)" ])
224
224
with json_tab :
225
225
st .json (pred .model_dump (), expanded = True )
@@ -230,8 +230,8 @@ def page_count(pdf_file):
230
230
if table_rec :
231
231
table_img , pred = table_recognition (pil_image , pil_image_highres , in_file , page_number - 1 if page_number else None , use_pdf_boxes , skip_table_detection )
232
232
with col1 :
233
- st .image (table_img , caption = "Table Recognition" , use_column_width = True )
233
+ st .image (table_img , caption = "Table Recognition" , use_container_width = True )
234
234
st .json ([p .model_dump () for p in pred ], expanded = True )
235
235
236
236
with col2 :
237
- st .image (pil_image , caption = "Uploaded Image" , use_column_width = True )
237
+ st .image (pil_image , caption = "Uploaded Image" , use_container_width = True )
0 commit comments