refact: add log
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user