yan chuanli 2 jaren geleden
bovenliggende
commit
53d924d930
2 gewijzigde bestanden met toevoegingen van 51 en 40 verwijderingen
  1. 49 30
      to_md/ocr_config.py
  2. 2 10
      to_md/use.py

+ 49 - 30
to_md/ocr_config.py

@@ -22,58 +22,77 @@ class Configs:
 
 # cet
 cet_local_config = RequestConfig(url='http://192.168.199.27:18050/ocr_system/cet', token='')
-cet_test_config = RequestConfig(
-    url='http://aihub-test.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/cettest/cet',
-    token='9679c2b3-b90b-4029-a3c7-f347b4d242f7')
-cet_sb_config = RequestConfig(
-    url='http://aihub.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/cettest/cet',
+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,
-    'test': cet_test_config,
-    'sb': cet_sb_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_test_config = RequestConfig(
-    url='http://aihub-test.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/hkbsb/regbook',
-    token='9679c2b3-b90b-4029-a3c7-f347b4d242f7')
-regbook_sb_config = RequestConfig(
+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,
-    'test': regbook_test_config,
-    'sb': regbook_sb_config
-}
-
-OCR_CONFIGS = {
-    'cet': CET_CONFIGS,
-    'regbook': REGBOOK_CONFIGS
+    'TXtest': regbook_TXtest_config,
+    'TXsb': regbook_TXsb_config,
+    'DXtest': regbook_DXtest_config,
+    'DXsb': regbook_DXsb_config
 }
 
 # business_license
-business_license_local_config = RequestConfig(url='http://192.168.199.27:18060/ocr_system/business_license', token='')
-business_license_test_config = RequestConfig(
-    url='http://aihub-test.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/hkbsb/regbook',
-    token='9679c2b3-b90b-4029-a3c7-f347b4d242f7')
-business_license_sb_config = RequestConfig(
-    url='http://aihub.digitalyili.com/aiSquare/openApi/reasoning-services/rlocrxm/hkbsb/regbook',
+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')
-
-BUSINESS_CONFIGS = {
-    'local': business_license_local_config,
-    'test': business_license_test_config,
-    'sb': business_license_sb_config
+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': BUSINESS_CONFIGS
+    'business_license': BLFE_CONFIGS
 }
 
 # 字段

+ 2 - 10
to_md/use.py

@@ -1,11 +1,3 @@
-'''
-Author: zeke-chin zeke-chin@icloud.com
-Date: 2022-09-26 14:58:10
-LastEditors: zeke-chin zeke-chin@icloud.com
-LastEditTime: 2022-09-27 10:00:47
-FilePath: /HROCR/to_md/to_md/use.py
-Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE`
-'''
 
 from pathlib import Path
 
@@ -17,9 +9,9 @@ image_path = Path('/Users/sxkj/Desktop/户口本9.8/img')
 image_type = 0
 # 是否旋转
 image_rotate = False
-ocr_address = 'local'  # 'local' 'test' 'sb'
+ocr_address = 'local'  # 'local' 'TXtest' 'TXsb''DXtest' 'DXsb'
 
-ocr_name = 'regbook'  # 'cet' 'idcard' 'bankcard' 'regbook' 'schoolcert'
+ocr_name = 'regbook'  # 'cet' 'idcard' 'bankcard' 'regbook' 'schoolcert''business_license'
 md_name = 'RegBook'
 filed = 'regbook'