fix user login issue (#85)

This commit is contained in:
KevinHuSh
2024-02-29 14:03:07 +08:00
committed by GitHub
parent e86c820461
commit 0429107e80
12 changed files with 99 additions and 79 deletions

View File

@ -25,7 +25,7 @@ class HuParser:
def __init__(self):
self.ocr = OCR()
if not hasattr(self, "model_speciess"):
self.model_speciess = ParserType.GENERAL.value
self.model_speciess = ParserType.NAIVE.value
self.layouter = LayoutRecognizer("layout."+self.model_speciess)
self.tbl_det = TableStructureRecognizer()

View File

@ -34,8 +34,7 @@ class LayoutRecognizer(Recognizer):
"Equation",
]
def __init__(self, domain):
super().__init__(self.labels, domain,
os.path.join(get_project_base_directory(), "rag/res/deepdoc/"))
super().__init__(self.labels, domain) #, os.path.join(get_project_base_directory(), "rag/res/deepdoc/"))
def __call__(self, image_list, ocr_res, scale_factor=3, thr=0.2, batch_size=16):
def __is_garbage(b):

View File

@ -33,8 +33,7 @@ class TableStructureRecognizer(Recognizer):
]
def __init__(self):
super().__init__(self.labels, "tsr",
os.path.join(get_project_base_directory(), "rag/res/deepdoc/"))
super().__init__(self.labels, "tsr")#,os.path.join(get_project_base_directory(), "rag/res/deepdoc/"))
def __call__(self, images, thr=0.2):
tbls = super().__call__(images, thr)