"vscode:/vscode.git/clone" did not exist on "ae826a408f329a0deaa891819baef273da0a7abb"
Commit f51af219 authored by 赵小蒙's avatar 赵小蒙
Browse files

update cli

parent aad5652c
...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment