Spaces:
Running
Running
root commited on
Commit ·
82c0486
1
Parent(s): 3cb1edf
add sr
Browse files131 unmodified lines132133134135136137138131 unmodified lines}idx = idx_map[idx]image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])d = {"data":[image_data, 0]} # batch_size设置为0,url = "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"})result_text = r.text131 unmodified lines132133134135136137138131 unmodified lines}idx = idx_map[idx]image_data = re.sub('^data:image/.+;base64,', '', img_str[idx])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"})result_text = r.text
app.py+1-1