Spaces:
Build error
Build error
PatrickSchrML
commited on
Commit
·
451354b
1
Parent(s):
17c2a9a
fix
Browse files
app.py
CHANGED
@@ -47,12 +47,7 @@ def infer(prompt, n_samples, steps, scale, seed):
|
|
47 |
print(data)
|
48 |
for image in data['output']['choices']:
|
49 |
im = Image.open(BytesIO(base64.b64decode(image['image_base64'])))
|
50 |
-
|
51 |
-
im.save(im_file, format="JPEG")
|
52 |
-
im_bytes = im_file.getvalue() # im_bytes: image in binary format.
|
53 |
-
im_b64 = base64.b64encode(im_bytes)
|
54 |
-
image_b64 = (f"data:image/jpeg;base64,{im_b64}")
|
55 |
-
images.append(image_b64)
|
56 |
|
57 |
# payload = {'prompt': prompt}
|
58 |
# images_request = requests.post(url, json=payload)
|
|
|
47 |
print(data)
|
48 |
for image in data['output']['choices']:
|
49 |
im = Image.open(BytesIO(base64.b64decode(image['image_base64'])))
|
50 |
+
images.append(im)
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
# payload = {'prompt': prompt}
|
53 |
# images_request = requests.post(url, json=payload)
|