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

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 and (cropped.shape[0] > 1 and cropped.shape[1] > 1):
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] > 3 and cropped.shape[1] > 3):
431
  if label == "fig":
432
  # 对于图像区域,提取图像的base64编码
433
  try: