修正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,24 @@
import os
from flask import jsonify
def process_request(func):
"""
api通用处理函数
"""
def wrapper(*args, **kwargs):
try:
result = func(*args, **kwargs)
return jsonify(result), 200
except Exception as e:
return jsonify({'error': str(e)}), 500
return wrapper
def parse_img_path(img_path):
dirname = os.path.dirname(img_path)
img_name, ext = os.path.basename(img_path).rsplit('.', 1)
return dirname, img_name, ext