修正docker镜像构建

This commit is contained in:
2024-09-25 16:07:12 +08:00
parent 3189caf7aa
commit 72794f699e
13 changed files with 44 additions and 46 deletions

View File

@@ -0,0 +1,18 @@
from flask import Flask, request
from paddleocr import PaddleOCR
from utils import process_request
app = Flask(__name__)
OCR = PaddleOCR(use_angle_cls=False, show_log=False, gpu_id=0, det_db_box_thresh=0.3)
@app.route('/ocr', methods=['POST'])
@process_request
def ocr():
img_path = request.form.get('img_path')
return OCR.ocr(img_path, cls=False)
if __name__ == '__main__':
app.run('0.0.0.0', 5001)