marcowu commited on
Commit
393e28c
·
1 Parent(s): a4894fe

fix: exclude Figure type content from markdown display

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -285,9 +285,10 @@ def _parse_document_internal(image: Optional[Image.Image],
285
  # Draw layout boxes on image
286
  image_with_boxes = draw_layout_boxes(image, layout_bboxes)
287
 
288
- # Create markdown content
289
  markdown_content = "\n\n".join([
290
- item.get('content', '') for item in page_result if item.get('content')
 
291
  ])
292
 
293
  # Create JSON content (include hierarchy info)
 
285
  # Draw layout boxes on image
286
  image_with_boxes = draw_layout_boxes(image, layout_bboxes)
287
 
288
+ # Create markdown content (exclude Figure type items)
289
  markdown_content = "\n\n".join([
290
+ item.get('content', '') for item in page_result
291
+ if item.get('content') and item.get('type') != 'Figure'
292
  ])
293
 
294
  # Create JSON content (include hierarchy info)