启用ocr中的cls功能

This commit is contained in:
2024-06-24 11:03:43 +08:00
parent aa83b88536
commit a81719bdc7
3 changed files with 41 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
from paddlenlp import Taskflow
from paddleocr import PaddleOCR
from config.keys import SETTLEMENT_LIST_SCHEMA, DISCHARGE_RECORD_SCHEMA, COST_LIST_SCHEMA
@@ -36,3 +37,6 @@ DISCHARGE_IE = Taskflow("information_extraction", schema=DISCHARGE_RECORD_SCHEMA
# 费用清单
COST_IE = Taskflow("information_extraction", schema=COST_LIST_SCHEMA, model="uie-x-base",
task_path="config/model/cost_list_model", layout_analysis=LAYOUT_ANALYSIS, batch_size=IE_BATCH_SIZE)
# OCR
OCR = PaddleOCR(use_angle_cls=True, lang="ch", show_log=False)