feat image2sketch 变更模型

fix
This commit is contained in:
zhouchengrong
2024-09-30 10:57:12 +08:00
parent 19fa165a1e
commit 85942167f3
6 changed files with 200 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ from PIL import Image
from minio import Minio
from app.core.config import *
from app.service.utils.decorator import RunTime
minio_client = Minio(MINIO_URL, access_key=MINIO_ACCESS, secret_key=MINIO_SECRET, secure=MINIO_SECURE)
@@ -39,6 +40,7 @@ http_client = urllib3.PoolManager(
# 获取图片
@RunTime
def oss_get_image(oss_client, bucket, object_name, data_type):
# cv2 默认全通道读取
image_object = None
@@ -58,6 +60,7 @@ def oss_get_image(oss_client, bucket, object_name, data_type):
return image_object
@RunTime
def oss_upload_image(oss_client, bucket, object_name, image_bytes):
req = None
try: