wip
Browse files
app.py
CHANGED
|
@@ -23,7 +23,8 @@ async def generate_async(images, prompt, variation, size):
|
|
| 23 |
with open(img.name, "rb") as f:
|
| 24 |
image_bytes = f.read()
|
| 25 |
encoded = base64.b64encode(image_bytes).decode("utf-8")
|
| 26 |
-
|
|
|
|
| 27 |
except Exception as e:
|
| 28 |
print(f"⚠️ Failed to process image {img.name}: {e}")
|
| 29 |
|
|
|
|
| 23 |
with open(img.name, "rb") as f:
|
| 24 |
image_bytes = f.read()
|
| 25 |
encoded = base64.b64encode(image_bytes).decode("utf-8")
|
| 26 |
+
prefixed_b64 = f"data:image/png;base64,{encoded}"
|
| 27 |
+
images_input.append(prefixed_b64)
|
| 28 |
except Exception as e:
|
| 29 |
print(f"⚠️ Failed to process image {img.name}: {e}")
|
| 30 |
|