From fe28f26fc237fbeb7612bb66a11a99602c6cf5e6 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Fri, 7 Nov 2025 13:18:38 -0500 Subject: [PATCH] Adjust bbox format --- chandra/output.py | 3 +-- chandra/settings.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/chandra/output.py b/chandra/output.py index 9afe54a..8dc3ad9 100644 --- a/chandra/output.py +++ b/chandra/output.py @@ -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] diff --git a/chandra/settings.py b/chandra/settings.py index d0abd1b..5fa078a 100644 --- a/chandra/settings.py +++ b/chandra/settings.py @@ -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"