mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
fix user login issue (#85)
This commit is contained in:
@ -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()
|
||||
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user