Spaces:
Sleeping
Sleeping
MrDonStuff
commited on
Commit
•
5065d5c
1
Parent(s):
cc1489b
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,9 @@ def query(prompt, is_negative=False, steps=1, cfg_scale=6, seed=None):
|
|
25 |
"seed": seed if seed is not None else random.randint(-1, 2147483647)
|
26 |
}
|
27 |
|
28 |
-
|
|
|
|
|
29 |
image = Image.open(io.BytesIO(image_bytes))
|
30 |
return image
|
31 |
|
|
|
25 |
"seed": seed if seed is not None else random.randint(-1, 2147483647)
|
26 |
}
|
27 |
|
28 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
29 |
+
response.raise_for_status()
|
30 |
+
image_bytes = response.content
|
31 |
image = Image.open(io.BytesIO(image_bytes))
|
32 |
return image
|
33 |
|