mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-07-31 00:43:37 +08:00
Fix: adapt to old configurations. (#6321)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
5b04b7d972
commit
95497b4aab
@ -263,6 +263,8 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
|
|||||||
|
|
||||||
elif re.search(r"\.pdf$", filename, re.IGNORECASE):
|
elif re.search(r"\.pdf$", filename, re.IGNORECASE):
|
||||||
layout_recognizer = parser_config.get("layout_recognize", "DeepDOC")
|
layout_recognizer = parser_config.get("layout_recognize", "DeepDOC")
|
||||||
|
if isinstance(layout_recognizer, bool):
|
||||||
|
layout_recognizer = "DeepDOC" if layout_recognizer else "Plain Text"
|
||||||
callback(0.1, "Start to parse.")
|
callback(0.1, "Start to parse.")
|
||||||
|
|
||||||
if layout_recognizer == "DeepDOC":
|
if layout_recognizer == "DeepDOC":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user