调整模型载入

This commit is contained in:
2024-07-06 15:51:05 +08:00
parent 4b9b67f066
commit a737026166
2 changed files with 58 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
from paddlenlp import Taskflow
from paddleocr import PaddleOCR
from config import keys
SETTLEMENT_IE = Taskflow("information_extraction", schema=keys.SETTLEMENT_LIST_SCHEMA, model="uie-x-base",
task_path="config/model/settlement_list_model", layout_analysis=False)
DISCHARGE_IE = Taskflow("information_extraction", schema=keys.DISCHARGE_RECORD_SCHEMA, model="uie-x-base",
task_path="config/model/discharge_record_model", layout_analysis=False)
COST_IE = Taskflow("information_extraction", schema=keys.COST_LIST_SCHEMA, model="uie-x-base", device_id=1,
task_path="config/model/cost_list_model", layout_analysis=False)
OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False)