123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- from dataclasses import dataclass
- from typing import List
- @dataclass
- class Type:
- image_type: int
- image_field: List
- @dataclass
- class RequestConfig:
- url: str
- token: str
- @dataclass
- class Configs:
- request: RequestConfig
- type: Type
- # cet
- cet_local_config = RequestConfig(url='http://192.168.199.27:18050/ocr_system/cet', token='')
- cet_TXtest_config = RequestConfig(
- url='http://aihubtest.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm//cettest/cet',
- token='8ae1e5f1-1337-4f22-8d46-ff4c110d68fd')
- cet_TXsb_config = RequestConfig(
- url='http://aihub.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/cet/cet',
- token='dcae8cc6-0e49-4db8-a2d2-94ef84da3636')
- cet_DXtest_config = RequestConfig(
- url='http://aihubpre-idc.digitalyili.com/aiSquare/openApi/reasoning-services/hrocr/cettest/cet',
- token='4e00c444-620b-4d3c-85f4-777e64276f0e')
- cet_DXsb_config = RequestConfig(
- url='http://aihub-idc.digitalyili.com/aiSquare/openApi/reasoning-services/hrocr/cet/cet',
- token='e045de0a-e97f-4f23-b4d5-6a032c39a81e')
- CET_CONFIGS = {
- 'local': cet_local_config,
- 'TXtest': cet_TXtest_config,
- 'TXsb': cet_TXsb_config,
- 'DXtest': cet_DXtest_config,
- 'DXsb': cet_DXsb_config
- }
- # regbook
- regbook_local_config = RequestConfig(url='http://192.168.199.27:18040/ocr_system/regbook', token='')
- regbook_TXtest_config = RequestConfig(
- url='http://aihubtest.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm//hkbsbtest/regbook',
- token='8ae1e5f1-1337-4f22-8d46-ff4c110d68fd')
- regbook_TXsb_config = RequestConfig(
- url='http://aihub.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/hkbsb/regbook',
- token='dcae8cc6-0e49-4db8-a2d2-94ef84da3636')
- regbook_DXtest_config = RequestConfig(
- url='http://aihubpre-idc.digitalyili.com/aiSquare/openApi/reasoning-services/hrocr/hkbsbtest/regbook',
- token='4e00c444-620b-4d3c-85f4-777e64276f0e')
- regbook_DXsb_config = RequestConfig(
- url='http://aihub-idc.digitalyili.com/aiSquare/openApi/reasoning-services/hrocr/hkbsb/regbook',
- token='e045de0a-e97f-4f23-b4d5-6a032c39a81e')
- REGBOOK_CONFIGS = {
- 'local': regbook_local_config,
- 'TXtest': regbook_TXtest_config,
- 'TXsb': regbook_TXsb_config,
- 'DXtest': regbook_DXtest_config,
- 'DXsb': regbook_DXsb_config
- }
- # business_license
- blfe_local_config = RequestConfig(url='http://192.168.199.27:18060/ocr_system/business_license', token='')
- blfe_TXtest_config = RequestConfig(
- url='http://aihubtest.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/blfetest/blfe',
- token='8ae1e5f1-1337-4f22-8d46-ff4c110d68fd')
- blfe_TXsb_config = RequestConfig(
- url='http://aihub.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/blfe/blfe',
- token='dcae8cc6-0e49-4db8-a2d2-94ef84da3636')
- blfe_DXtest_config = RequestConfig(
- url='http://aihubpre-idc.digitalyili.com/aiSquare/openApi/reasoning-services/hrocr/blfetest/blfe',
- token='4e00c444-620b-4d3c-85f4-777e64276f0e')
- blfe_DXsb_config = RequestConfig(
- url='http://aihub-idc.digitalyili.com/aiSquare/openApi/reasoning-services/hrocr/blfe/blfe',
- token='e045de0a-e97f-4f23-b4d5-6a032c39a81e')
- BLFE_CONFIGS = {
- 'local': blfe_local_config,
- 'TXtest': blfe_TXtest_config,
- 'TXsb': blfe_TXsb_config,
- 'DXtest': blfe_DXtest_config,
- 'DXsb': blfe_DXsb_config
- }
- OCR_CONFIGS = {
- 'cet': CET_CONFIGS,
- 'regbook': REGBOOK_CONFIGS,
- 'business_license': BLFE_CONFIGS
- }
- # 字段
- cet_field = ['orientation', 'name', 'id', 'language', 'level', 'exam_time', 'score']
- regbook_field = ['orientation', 'name', 'id', 'gender', 'birthplace', 'birthplace_province', 'birthplace_city',
- 'birthplace_region', 'native_place', 'native_place_province', 'native_place_city',
- 'native_place_region', 'blood_type', 'religion']
- business_license = ['orientation', 'social_code', 'company_name', 'legal_person', 'registered_capital', 'type',
- 'start_date', 'business_scope', 'expire_date', 'address', 'stamp']
- Filed = {
- 'cet': cet_field,
- 'regbook': regbook_field,
- 'business_license': business_license
- }
|