mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-06-03 21:53:39 +08:00
fix hubserving run error (#13918)
* fix hubserving run error * Update paddleocr.py
This commit is contained in:
parent
2b51369324
commit
cda3e1201e
@ -915,8 +915,10 @@ def main():
|
||||
"""
|
||||
# for cmd
|
||||
args = parse_args(mMain=True)
|
||||
logger.info("for usage help, please use `paddleocr --help`")
|
||||
image_dir = args.image_dir
|
||||
if is_link(image_dir):
|
||||
os.remove("tmp.jpg") if os.path.exists("tmp.jpg") else None
|
||||
download_with_progressbar(image_dir, "tmp.jpg")
|
||||
image_file_list = ["tmp.jpg"]
|
||||
else:
|
||||
|
@ -49,7 +49,7 @@ def init_args():
|
||||
parser.add_argument("--gpu_id", type=int, default=0)
|
||||
|
||||
# params for text detector
|
||||
parser.add_argument("--image_dir", type=str, required=True)
|
||||
parser.add_argument("--image_dir", type=str)
|
||||
parser.add_argument("--page_num", type=int, default=0)
|
||||
parser.add_argument("--det_algorithm", type=str, default="DB")
|
||||
parser.add_argument("--det_model_dir", type=str)
|
||||
|
Loading…
x
Reference in New Issue
Block a user