save code
This commit is contained in:
@@ -540,7 +540,10 @@ def process_change_cloth(human_filename, cloth_filename, output_format, img_url,
|
||||
if no2:
|
||||
out_human_https_url = human_url
|
||||
else:
|
||||
if os.path.exists(f'{APP_ROOT}/../output/{out_human_name}'):
|
||||
out_human_image = Image.open(f'{APP_ROOT}/../output/{out_human_name}')
|
||||
else:
|
||||
out_human_image = Image.open(f'{APP_ROOT}/../input/{out_human_name}')
|
||||
out_human_jpg_name = out_human_name.replace(".png", ".jpg")
|
||||
out_human_jpg_path_name = f'{APP_ROOT}/static/imgs/{out_human_jpg_name}'
|
||||
out_human_image.save(out_human_jpg_path_name, quality=90)
|
||||
@@ -648,6 +651,8 @@ def do_change_cloth():
|
||||
tuodi = data['tuodi']
|
||||
print(f"tuodi:{tuodi}")
|
||||
|
||||
kuzi = False
|
||||
if 'kuzi' in data:
|
||||
kuzi = data['kuzi']
|
||||
print(f"kuzi:{kuzi}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user