mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-07-12 21:02:13 +02:00
Take pdf_parser out of ConfigLoader, use plain function arg
This commit is contained in:
parent
de58581900
commit
1629ef4318
4 changed files with 11 additions and 18 deletions
|
|
@ -685,14 +685,10 @@ def format_structure(structure, order=None):
|
|||
|
||||
|
||||
class ConfigLoader:
|
||||
# Code-side defaults for non-tuning settings (kept out of config.yaml).
|
||||
# yaml entries override these if present.
|
||||
_CODE_DEFAULTS = {"pdf_parser": "PyPDF2"}
|
||||
|
||||
def __init__(self, default_path: str = None):
|
||||
if default_path is None:
|
||||
default_path = Path(__file__).parent / "config.yaml"
|
||||
self._default_dict = {**self._CODE_DEFAULTS, **self._load_yaml(default_path)}
|
||||
self._default_dict = self._load_yaml(default_path)
|
||||
|
||||
@staticmethod
|
||||
def _load_yaml(path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue