将ocr加载到gpu1上
This commit is contained in:
@@ -10,4 +10,4 @@ DISCHARGE_IE = Taskflow("information_extraction", schema=keys.DISCHARGE_RECORD_S
|
||||
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, precision='fp16')
|
||||
|
||||
OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False)
|
||||
OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False, gpu_id=1)
|
||||
|
||||
21
test.py
21
test.py
@@ -1,21 +0,0 @@
|
||||
from paddlenlp import Taskflow
|
||||
|
||||
SCHEMA = ["患者姓名", "入院日期", "出院日期", "费用总额", "个人现金支付", "个人账户支付", "自费金额", "医保类型",
|
||||
"住院号", "医保结算单号码"]
|
||||
|
||||
IE = Taskflow("information_extraction", schema=SCHEMA, model="uie-x-base",
|
||||
task_path="config/model/settlement_list_model", layout_analysis=True)
|
||||
|
||||
|
||||
def main():
|
||||
i = 0
|
||||
try:
|
||||
while 1:
|
||||
IE({"doc": "visual_model_test/img/PH20240511000638_1_094306_1.jpg"})
|
||||
i += 1
|
||||
except Exception:
|
||||
print(i)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user