使用用户 tmfc 身份运行

This commit is contained in:
William Jin 2024-09-26 17:01:03 +08:00
parent 6ca110f1f4
commit ab2446b3e7

View File

@ -174,10 +174,11 @@ def run_ocr(image):
# 调用 OCR 命令
command = [
"sudo", "-u", "tmfc",
"/home/tmfc/miniconda3/envs/got/bin/python3", "/home/tmfc/apps/got-ocr/GOT/demo/run_ocr_2.0_crop.py",
"--model-name", "/home/tmfc/apps/got-ocr/models/",
"--image-file", image_path,
"> /home/tmfc/apps/got-ocr/img.txt"
">", "/home/tmfc/apps/got-ocr/img.txt"
]
try: