HaoFeng2025 commited on
Commit
90b445b
·
verified ·
1 Parent(s): ab40c3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -427,7 +427,7 @@ def process_elements(layout_results, padded_image, dims, max_batch_size=16):
427
 
428
  # 裁剪并解析元素
429
  cropped = padded_image[y1:y2, x1:x2]
430
- if cropped.size > 0:
431
  if label == "fig":
432
  # 对于图像区域,提取图像的base64编码
433
  try:
 
427
 
428
  # 裁剪并解析元素
429
  cropped = padded_image[y1:y2, x1:x2]
430
+ if cropped.size > 0 and (cropped.shape[0] > 1 and cropped.shape[1] > 1):
431
  if label == "fig":
432
  # 对于图像区域,提取图像的base64编码
433
  try: