This commit is contained in:
William Jin 2024-09-26 15:53:52 +08:00
parent 821b2faf30
commit 1bc4aeee85

View File

@ -179,7 +179,7 @@ def run_ocr(image):
"--image-file", image_path "--image-file", image_path
] ]
result = subprocess.run(command, capture_output=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) result = subprocess.run(command, shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# 获取 OCR 识别的输出 # 获取 OCR 识别的输出
ocr_output = result.stdout ocr_output = result.stdout