root commited on
Commit
668e1df
·
1 Parent(s): 8d3ca32

fixed sr bug

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -136,7 +136,7 @@ def sr_request_images(img_str, idx):
136
  # image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])
137
  image_data = img_str[idx]
138
  # print(image_data)
139
- d = {"data":[image_data, 0, False, 512, 512, -1]} # batch_size设置为0,sr_opt设置为False, 新加了3个参数w,h,seed,随便放就行,进去不会走这个路
140
  url = "http://flagart.baai.ac.cn/api/general/"
141
  r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
142
  result_text = r.text
 
136
  # image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])
137
  image_data = img_str[idx]
138
  # print(image_data)
139
+ d = {"data":[image_data, 0, False, float(512), float(512), float(-1)]} # batch_size设置为0,sr_opt设置为False, 新加了3个参数w,h,seed,随便放就行,进去不会走这个路
140
  url = "http://flagart.baai.ac.cn/api/general/"
141
  r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
142
  result_text = r.text