Преглед на файлове

fix: read_api list files

xu rui преди 11 месеца
родител
ревизия
f3ceebc41b
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      magic_pdf/data/read_api.py

+ 2 - 2
magic_pdf/data/read_api.py

@@ -58,7 +58,7 @@ def read_local_pdfs(path: str) -> list[PymuDocDataset]:
         list[PymuDocDataset]: each pdf file will converted to a PymuDocDataset
     """
     if os.path.isdir(path):
-        reader = FileBasedDataReader(path)
+        reader = FileBasedDataReader()
         ret = []
         for root, _, files in os.walk(path):
             for file in files:
@@ -85,7 +85,7 @@ def read_local_images(path: str, suffixes: list[str]=[]) -> list[ImageDataset]:
     if os.path.isdir(path):
         imgs_bits = []
         s_suffixes = set(suffixes)
-        reader = FileBasedDataReader(path)
+        reader = FileBasedDataReader()
         for root, _, files in os.walk(path):
             for file in files:
                 suffix = file.split('.')