Spaces:
Runtime error
Runtime error
root
commited on
Commit
•
60dbacf
1
Parent(s):
edc3311
Front-Back connect test
Browse files
app.py
CHANGED
@@ -125,9 +125,9 @@ def call_JS(sd_method, **kwargs):
|
|
125 |
param_str = json.dumps(kwargs)
|
126 |
return f"async (...x) => {{ return await SD.{sd_method}({{ x, ...{param_str} }}) ?? []; }}"
|
127 |
|
128 |
-
def img2img(
|
129 |
url = "http://flagart.baai.ac.cn/api/img2img/"
|
130 |
-
d = {"data":
|
131 |
r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
|
132 |
print(r)
|
133 |
result_text = r.text
|
|
|
125 |
param_str = json.dumps(kwargs)
|
126 |
return f"async (...x) => {{ return await SD.{sd_method}({{ x, ...{param_str} }}) ?? []; }}"
|
127 |
|
128 |
+
def img2img(*args):
|
129 |
url = "http://flagart.baai.ac.cn/api/img2img/"
|
130 |
+
d = {"data":args}
|
131 |
r = requests.post(url, json=d, headers={"Content-Type": "application/json", "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "keep-alive"})
|
132 |
print(r)
|
133 |
result_text = r.text
|