def table_img_to_html(table_image: Image) -> str:
    """
    Note this expects the image to already be cropped to the table
    """
    table_image = table_image.convert("RGB")
    image_tensor = _image_to_tensor(table_image, size=(448, 448))

    pred_html = predict_html(image_tensor)
    pred_bbox = predict_bboxes(image_tensor, image_size=table_image.size)
    pred_cell_lst = predict_cells(image_tensor, pred_bbox, table_image)

    table_str_lst = build_table_from_html_and_cell(pred_html, pred_cell_lst)
    table_str = "".join(table_str_lst)
    table_str = html_table_template(table_str)

    return table_str

    Note this expects the image to already be cropped to the table
    
src/openparse/tables/unitable/core.py