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
f51af219
"vscode:/vscode.git/clone" did not exist on "ae826a408f329a0deaa891819baef273da0a7abb"
Commit
f51af219
authored
Jun 26, 2024
by
赵小蒙
Browse files
update cli
parent
aad5652c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
magic_pdf/cli/magicpdf.py
magic_pdf/cli/magicpdf.py
+8
-2
No files found.
magic_pdf/cli/magicpdf.py
View file @
f51af219
...
@@ -174,7 +174,10 @@ def cli():
...
@@ -174,7 +174,10 @@ def cli():
help
=
"指定解析方法。txt: 文本型 pdf 解析方法, ocr: 光学识别解析 pdf, auto: 程序智能选择解析方法"
,
help
=
"指定解析方法。txt: 文本型 pdf 解析方法, ocr: 光学识别解析 pdf, auto: 程序智能选择解析方法"
,
default
=
"auto"
,
default
=
"auto"
,
)
)
def
json_command
(
json
,
method
):
@
click
.
option
(
"--inside_model"
,
type
=
click
.
BOOL
,
default
=
False
,
help
=
"使用内置模型测试"
)
def
json_command
(
json
,
method
,
inside_model
):
model_config
.
__use_inside_model__
=
inside_model
if
not
json
.
startswith
(
"s3://"
):
if
not
json
.
startswith
(
"s3://"
):
logger
.
error
(
"usage: magic-pdf json-command --json s3://some_bucket/some_path"
)
logger
.
error
(
"usage: magic-pdf json-command --json s3://some_bucket/some_path"
)
exit
(
1
)
exit
(
1
)
...
@@ -222,7 +225,10 @@ def json_command(json, method):
...
@@ -222,7 +225,10 @@ def json_command(json, method):
help
=
"指定解析方法。txt: 文本型 pdf 解析方法, ocr: 光学识别解析 pdf, auto: 程序智能选择解析方法"
,
help
=
"指定解析方法。txt: 文本型 pdf 解析方法, ocr: 光学识别解析 pdf, auto: 程序智能选择解析方法"
,
default
=
"auto"
,
default
=
"auto"
,
)
)
def
local_json_command
(
local_json
,
method
):
@
click
.
option
(
"--inside_model"
,
type
=
click
.
BOOL
,
default
=
False
,
help
=
"使用内置模型测试"
)
def
local_json_command
(
local_json
,
method
,
inside_model
):
model_config
.
__use_inside_model__
=
inside_model
def
read_s3_path
(
s3path
):
def
read_s3_path
(
s3path
):
bucket
,
key
=
parse_s3path
(
s3path
)
bucket
,
key
=
parse_s3path
(
s3path
)
...
...
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