mirror of
https://github.com/datalab-to/chandra.git
synced 2025-11-29 16:43:11 +00:00
Adjust bbox format
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import hashlib
|
||||
import json
|
||||
import re
|
||||
from dataclasses import dataclass, asdict
|
||||
from functools import lru_cache
|
||||
@@ -241,7 +240,7 @@ def parse_layout(html: str, image: Image.Image):
|
||||
bbox = div.get("data-bbox")
|
||||
|
||||
try:
|
||||
bbox = json.loads(bbox)
|
||||
bbox = bbox.split(" ")
|
||||
except Exception:
|
||||
bbox = [0, 0, 1, 1]
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class Settings(BaseSettings):
|
||||
TORCH_DEVICE: str | None = None
|
||||
MAX_OUTPUT_TOKENS: int = 12384
|
||||
TORCH_ATTN: str | None = None
|
||||
BBOX_SCALE: int = 1024
|
||||
BBOX_SCALE: int = 1000
|
||||
|
||||
# vLLM server settings
|
||||
VLLM_API_KEY: str = "EMPTY"
|
||||
|
||||
Reference in New Issue
Block a user