import json from PIL import Image from google import genai from google.genai import types from io import BytesIO from pydantic import BaseModel from marker.settings import settings prompt = """ You're an expert document analyst who is good at turning tables in documents into HTML. Analyze the provided image, and convert it to a faithful HTML representation. Guidelines: - Keep the HTML simple and concise. - Only include the
tags. Only use the colspan and rowspan attributes if necessary. Do not use | tags.
- Make sure the table is as faithful to the image as possible with the given tags.
**Instructions**
1. Analyze the image, and determine the table structure.
2. Convert the table image to HTML, following the guidelines above.
3. Output only the HTML for the table, starting with the |
---|