refact: add log

This commit is contained in:
liuyuanchuang
2026-02-05 20:50:04 +08:00
parent 15986c8966
commit c93eba2839
4 changed files with 74 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ class Settings(BaseSettings):
debug: bool = False
# PaddleOCR-VL Settings
paddleocr_vl_url: str = "http://127.0.0.1:8000/v1"
paddleocr_vl_url: str = "http://127.0.0.1:8001/v1"
# MinerOCR Settings
miner_ocr_api_url: str = "http://127.0.0.1:8000/file_parse"

View File

@@ -49,10 +49,11 @@ def get_converter() -> Converter:
def get_mineru_ocr_service() -> MineruOCRService:
"""Get a MinerOCR service instance."""
settings = get_settings()
api_url = getattr(settings, 'miner_ocr_api_url', 'http://127.0.0.1:8000/file_parse')
api_url = getattr(settings, "miner_ocr_api_url", "http://127.0.0.1:8000/file_parse")
paddleocr_vl_url = getattr(settings, "paddleocr_vl_url", "http://localhost:8001/v1")
return MineruOCRService(
api_url=api_url,
converter=get_converter(),
image_processor=get_image_processor(),
paddleocr_vl_url=paddleocr_vl_url,
)