Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
f3ceebc4
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "3b8f24525facdce749c49615f7b7b7ecbde89fb1"
Commit
f3ceebc4
authored
Dec 10, 2024
by
xu rui
Browse files
fix: read_api list files
parent
3cd51d49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
magic_pdf/data/read_api.py
magic_pdf/data/read_api.py
+2
-2
No files found.
magic_pdf/data/read_api.py
View file @
f3ceebc4
...
@@ -58,7 +58,7 @@ def read_local_pdfs(path: str) -> list[PymuDocDataset]:
...
@@ -58,7 +58,7 @@ def read_local_pdfs(path: str) -> list[PymuDocDataset]:
list[PymuDocDataset]: each pdf file will converted to a PymuDocDataset
list[PymuDocDataset]: each pdf file will converted to a PymuDocDataset
"""
"""
if
os
.
path
.
isdir
(
path
):
if
os
.
path
.
isdir
(
path
):
reader
=
FileBasedDataReader
(
path
)
reader
=
FileBasedDataReader
()
ret
=
[]
ret
=
[]
for
root
,
_
,
files
in
os
.
walk
(
path
):
for
root
,
_
,
files
in
os
.
walk
(
path
):
for
file
in
files
:
for
file
in
files
:
...
@@ -85,7 +85,7 @@ def read_local_images(path: str, suffixes: list[str]=[]) -> list[ImageDataset]:
...
@@ -85,7 +85,7 @@ def read_local_images(path: str, suffixes: list[str]=[]) -> list[ImageDataset]:
if
os
.
path
.
isdir
(
path
):
if
os
.
path
.
isdir
(
path
):
imgs_bits
=
[]
imgs_bits
=
[]
s_suffixes
=
set
(
suffixes
)
s_suffixes
=
set
(
suffixes
)
reader
=
FileBasedDataReader
(
path
)
reader
=
FileBasedDataReader
()
for
root
,
_
,
files
in
os
.
walk
(
path
):
for
root
,
_
,
files
in
os
.
walk
(
path
):
for
file
in
files
:
for
file
in
files
:
suffix
=
file
.
split
(
'.'
)
suffix
=
file
.
split
(
'.'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment