chenxujun 694c092809 | 1 year ago | |
---|---|---|
.. | ||
README.md | 1 year ago | |
README_en.md | 1 year ago | |
client.py | 1 year ago | |
server.py | 1 year ago |
使用有SimpleServing功能的PaddleNLP版本(或者最新的develop版本)
pip install paddlenlp >= 2.4.4
paddlenlp server server:app --workers 1 --host 0.0.0.0 --port 8189
python client.py
# Default schema
schema = ['开票日期', '名称', '纳税人识别号', '开户行及账号', '金额', '价税合计', 'No', '税率', '地址、电话', '税额']
# Default task_path
uie = Taskflow('information_extration', task_path='../../checkpoint/model_best/', schema=schema)
PaddleNLP SimpleServing 支持多卡负载均衡预测,主要在服务化注册的时候,注册两个Taskflow的task即可,下面是示例代码
uie1 = Taskflow('information_extraction', task_path='../../checkpoint/model_best/', schema=schema, device_id=0)
uie2 = Taskflow('information_extraction', task_path='../../checkpoint/model_best/', schema=schema, device_id=1)
service.register_taskflow('uie', [uie1, uie2])
# Changed to image paths you wanted
image_paths = ['../../data/images/b1.jpg']
No Description
Python C++ Cuda Text Markdown other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》