修改页面布局
调整执行命令
This commit is contained in:
parent
ab2446b3e7
commit
31ba144974
@ -178,7 +178,7 @@ def run_ocr(image):
|
||||
"/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:
|
||||
@ -256,8 +256,8 @@ with gr.Blocks() as iface:
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
image_input = gr.Image(type="pil", label="上传图片")
|
||||
btn_recognize = gr.Button("识别")
|
||||
with gr.Column():
|
||||
btn_recognize = gr.Button("识别")
|
||||
text_output = gr.Textbox(label="OCR 识别结果")
|
||||
|
||||
btn_recognize.click(fn=run_ocr, inputs=image_input, outputs=text_output)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user