使用多卡单线程
This commit is contained in:
@@ -7,7 +7,7 @@ SETTLEMENT_IE = Taskflow("information_extraction", schema=keys.SETTLEMENT_LIST_S
|
|||||||
task_path="config/model/settlement_list_model", layout_analysis=False)
|
task_path="config/model/settlement_list_model", layout_analysis=False)
|
||||||
DISCHARGE_IE = Taskflow("information_extraction", schema=keys.DISCHARGE_RECORD_SCHEMA, model="uie-x-base",
|
DISCHARGE_IE = Taskflow("information_extraction", schema=keys.DISCHARGE_RECORD_SCHEMA, model="uie-x-base",
|
||||||
task_path="config/model/discharge_record_model", layout_analysis=False)
|
task_path="config/model/discharge_record_model", layout_analysis=False)
|
||||||
COST_IE = Taskflow("information_extraction", schema=keys.COST_LIST_SCHEMA, model="uie-x-base",
|
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)
|
task_path="config/model/cost_list_model", layout_analysis=False)
|
||||||
|
|
||||||
OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False)
|
OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False)
|
||||||
|
|||||||
@@ -416,14 +416,14 @@ def photo_review(pk_phhd):
|
|||||||
elif phrec.cRectype == "4":
|
elif phrec.cRectype == "4":
|
||||||
cost_list.append(phrec)
|
cost_list.append(phrec)
|
||||||
|
|
||||||
with concurrent.futures.ThreadPoolExecutor() as executor:
|
# with concurrent.futures.ThreadPoolExecutor() as executor:
|
||||||
executor.submit(settlement_task, pk_phhd, settlement_list)
|
# executor.submit(settlement_task, pk_phhd, settlement_list)
|
||||||
executor.submit(discharge_task, pk_phhd, discharge_record)
|
# executor.submit(discharge_task, pk_phhd, discharge_record)
|
||||||
# executor.submit(settlement_and_discharge_task, pk_phhd, settlement_list, discharge_record)
|
# # executor.submit(settlement_and_discharge_task, pk_phhd, settlement_list, discharge_record)
|
||||||
executor.submit(cost_task, pk_phhd, cost_list)
|
# executor.submit(cost_task, pk_phhd, cost_list)
|
||||||
# settlement_task(pk_phhd, settlement_list)
|
settlement_task(pk_phhd, settlement_list)
|
||||||
# discharge_task(pk_phhd, discharge_record)
|
discharge_task(pk_phhd, discharge_record)
|
||||||
# cost_task(pk_phhd, cost_list)
|
cost_task(pk_phhd, cost_list)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user