Spaces:
Running
Running
root commited on
Commit ·
92a2592
1
Parent(s): 34a3d82
Adjust the layout
Browse files132 unmodified lines133134135136137138139132 unmodified linesidx = idx_map[idx]# image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])image_data = img_str[idx]print(image_data)d = {"data":[image_data, 0, False]} # batch_size设置为0,sr_opt设置为Falseurl = "http://flagart.baai.ac.cn/api/general/"r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})132 unmodified lines133134135136137138139132 unmodified linesidx = idx_map[idx]# image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])image_data = img_str[idx]# print(image_data)d = {"data":[image_data, 0, False]} # batch_size设置为0,sr_opt设置为Falseurl = "http://flagart.baai.ac.cn/api/general/"r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
app.py+1-1