From 9e7c6e3aafa1a39d061f56a4c48573ea5f9af870 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Sat, 6 Jul 2024 15:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=98=BE=E5=AD=98=E5=8D=A0?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000..9ede1e1 --- /dev/null +++ b/test.py @@ -0,0 +1,17 @@ +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)