feat 新增接口描述 docs页面 ,新增S3 图片get upload 操作,整理代码

fix
This commit is contained in:
zhouchengrong
2024-06-26 16:42:10 +08:00
parent 848e8bc5cb
commit 45a3597ffd
3 changed files with 3 additions and 3 deletions

View File

@@ -154,7 +154,7 @@ def generate_relight_image(request_item: GenerateProductImageModel, background_t
{ {
"tasks_id": "123-89", "tasks_id": "123-89",
"prompt": "beautiful woman, detailed face, sunshine, outdoor, warm atmosphere", "prompt": "beautiful woman, detailed face, sunshine, outdoor, warm atmosphere",
"image_url": "aida-sys-image/images/female/blouse/0628000098.jpg" "image_url": "aida-results/result_0000b606-1902-11ef-9424-0242ac180002.png"
} }
""" """
try: try:

View File

@@ -137,7 +137,7 @@ if __name__ == '__main__':
tasks_id="123-89", tasks_id="123-89",
# prompt="beautiful woman, detailed face, sunshine, outdoor, warm atmosphere", # prompt="beautiful woman, detailed face, sunshine, outdoor, warm atmosphere",
prompt="Colorful black", prompt="Colorful black",
image_url='aida-users/89/product_image/123-89.png' image_url='aida-results/result_0000b606-1902-11ef-9424-0242ac180002.png'
) )
server = GenerateRelightImage(rd) server = GenerateRelightImage(rd)
print(server.get_result()) print(server.get_result())

View File

@@ -63,7 +63,7 @@ if __name__ == '__main__':
# url = "aida-users/87/print/956614a2-7e75-4fbe-9ed0-c1831e37a2c9-4-87.png" # url = "aida-users/87/print/956614a2-7e75-4fbe-9ed0-c1831e37a2c9-4-87.png"
# url = "aida-users/89/single_logo/123-89.png" # url = "aida-users/89/single_logo/123-89.png"
# url = "aida-users/89/product_image/string-89.png" # url = "aida-users/89/product_image/string-89.png"
url = "aida-clothing/mask/mask_773e270b-3369-11ef-abe4-b0dcefbff887.png" url = 'aida-users/89/relight_image/123-89.png'
read_type = "PIL" read_type = "PIL"
if read_type == "cv2": if read_type == "cv2":
img = oss_get_image(bucket=url.split('/')[0], object_name=url[url.find('/') + 1:], data_type=read_type) img = oss_get_image(bucket=url.split('/')[0], object_name=url[url.find('/') + 1:], data_type=read_type)