wsj1995 commited on
Commit
98a0c21
·
verified ·
1 Parent(s): f96b34e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -81,6 +81,7 @@ def run(params):
81
  output_image_path = remove_metadata(downloaded_image,result_image)
82
  print("元数据移除完成")
83
  if access_key_id and endpoint and bucket_name:
 
84
  # 步骤 3:上传到阿里云 OSS
85
  oss_url = upload_to_oss(output_image_path, upload_filename, bucket_name, access_key_id, access_key_secret,securityToken, endpoint)
86
 
@@ -99,6 +100,7 @@ def run(params):
99
  else:
100
  return "上传到 OSS 失败"
101
  else:
 
102
  with open(output_image_path,'rb') as f:
103
  image_base64 = base64.b64encode(f.read())
104
  print("运行完成")
 
81
  output_image_path = remove_metadata(downloaded_image,result_image)
82
  print("元数据移除完成")
83
  if access_key_id and endpoint and bucket_name:
84
+ print('上传OSS')
85
  # 步骤 3:上传到阿里云 OSS
86
  oss_url = upload_to_oss(output_image_path, upload_filename, bucket_name, access_key_id, access_key_secret,securityToken, endpoint)
87
 
 
100
  else:
101
  return "上传到 OSS 失败"
102
  else:
103
+ print('不上传OSS')
104
  with open(output_image_path,'rb') as f:
105
  image_base64 = base64.b64encode(f.read())
106
  print("运行完成")