Spaces:
Runtime error
Runtime error
root
commited on
Commit
•
12af5bd
1
Parent(s):
df47c13
fixed sr bug
Browse files
app.py
CHANGED
@@ -139,11 +139,11 @@ def sr_request_images(img_str, idx, w, h, seed):
|
|
139 |
image_data = img_str[idx]
|
140 |
# print(image_data)
|
141 |
d = {"data":[image_data, 0, False, w, h, seed]} # batch_size设置为0,sr_opt设置为False, 新加了3个参数w,h,seed,随便放就行,进去不会走这个路
|
142 |
-
print(w,h,seed)
|
143 |
url = "http://flagart.baai.ac.cn/api/general/"
|
144 |
r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
|
145 |
result_text = r.text
|
146 |
-
print(result_text)
|
147 |
content = json.loads(result_text)["data"][0]
|
148 |
# print(content)
|
149 |
images = [base2picture(content[0])]
|
|
|
139 |
image_data = img_str[idx]
|
140 |
# print(image_data)
|
141 |
d = {"data":[image_data, 0, False, w, h, seed]} # batch_size设置为0,sr_opt设置为False, 新加了3个参数w,h,seed,随便放就行,进去不会走这个路
|
142 |
+
# print(w,h,seed)
|
143 |
url = "http://flagart.baai.ac.cn/api/general/"
|
144 |
r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
|
145 |
result_text = r.text
|
146 |
+
# print(result_text)
|
147 |
content = json.loads(result_text)["data"][0]
|
148 |
# print(content)
|
149 |
images = [base2picture(content[0])]
|