root commited on
Commit
0c0a4c2
1 Parent(s): 2b93d47
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -131,7 +131,8 @@ def sr_request_images(img_str, idx):
131
  "图片4(img4)":3,
132
  }
133
  idx = idx_map[idx]
134
- image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])
 
135
  d = {"data":[image_data, 0, False]} # batch_size设置为0,sr_opt设置为False
136
  url = "http://flagart.baai.ac.cn/api/general/"
137
  r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
 
131
  "图片4(img4)":3,
132
  }
133
  idx = idx_map[idx]
134
+ # image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])
135
+ image_data = img_str[idx]
136
  d = {"data":[image_data, 0, False]} # batch_size设置为0,sr_opt设置为False
137
  url = "http://flagart.baai.ac.cn/api/general/"
138
  r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})