• myhloli's avatar
    refactor(ocr): replace AtomModelSingleton with ocr_model_init for OCR model instantiation · 47a83d28
    myhloli authored
    - Remove usage of AtomModelSingleton for OCR model creation
    - Add ocr_model_init function to initialize OCR model
    - Update OCR model initialization in pdf_extract_kit.py and pdf_parse_union_core_v2.py
    - Modify txt_spans_extract_v2 function to accept ocr_model as a parameter
    - Update parse_page_core function to use ocr_model instead of lang for OCR processing
    47a83d28
pdf_extract_kit.py 10.8 KB