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
acd0deb1
Unverified
Commit
acd0deb1
authored
Feb 14, 2025
by
shniubobo
Browse files
docs(web_api): Change docstrings style
parent
3b98efbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
projects/web_api/app.py
projects/web_api/app.py
+15
-15
No files found.
projects/web_api/app.py
View file @
acd0deb1
...
@@ -164,21 +164,21 @@ async def pdf_parse(
...
@@ -164,21 +164,21 @@ async def pdf_parse(
Execute the process of converting PDF to JSON and MD, outputting MD and JSON files
Execute the process of converting PDF to JSON and MD, outputting MD and JSON files
to the specified directory.
to the specified directory.
:param pdf_file: The PDF file to be parsed. Must not be specified together with
Args:
`
pdf_
path`
pdf_
file: The PDF file to be parsed. Must not be specified together with
:param pdf_path: The path to the PDF file to be parsed. Must not be specified
`pdf_path`
together with `pdf_file`
pdf_path: The path to the PDF file to be parsed. Must not be specified together
:param parse_method: Parsing method, can be auto, ocr, or txt. Default is auto. If
with `pdf_file`
results are not satisfactory, try ocr
parse_method: Parsing method, can be auto, ocr, or txt. Default is auto. If
:param is_json_md_dump: Whether to write parsed data to .json and .md files. Default
results are not satisfactory, try ocr
to False. Different stages of data will be written to different .json files (3
is_json_md_dump: Whether to write parsed data to .json and .md files. Default
in total), md content will be saved to .md
file
to False. Different stages of data will be written to different .json
file
s
:param output_dir: Output directory for results. A folder named after the PDF
file
(3 in total), md content will be saved to .md
file
will be created to store all results
output_dir: Output directory for results. A folder named after the PDF file
:param return_layout: Whether
to
re
turn parsed PDF layout. Default to False
will be created to s
tore
all results
:param
return_
info
: Whether to return parsed PDF
info
. Default to False
return_
layout
: Whether to return parsed PDF
layout
. Default to False
:param
return_
content_list
: Whether to return parsed PDF
content list
. Default to
return_
info
: Whether to return parsed PDF
info
. Default to
False
False
return_content_list: Whether to return parsed PDF content list. Default to
False
"""
"""
try
:
try
:
if
(
pdf_file
is
None
and
pdf_path
is
None
)
or
(
if
(
pdf_file
is
None
and
pdf_path
is
None
)
or
(
...
...
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