Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,6 +31,7 @@ def generate_and_show_surfer_image(next_tide: str) -> str:
|
|
31 |
prompt = f"Generate a surfer {action}"
|
32 |
try:
|
33 |
image_result = image_generation_tool(prompt)
|
|
|
34 |
image_result.save(image_byte_arr, format='JPEG')
|
35 |
image_byte_arr = image_byte_arr.getvalue()
|
36 |
base64_image = base64.b64encode(image_byte_arr).decode('utf-8')
|
|
|
31 |
prompt = f"Generate a surfer {action}"
|
32 |
try:
|
33 |
image_result = image_generation_tool(prompt)
|
34 |
+
image_byte_arr = io.BytesIO()
|
35 |
image_result.save(image_byte_arr, format='JPEG')
|
36 |
image_byte_arr = image_byte_arr.getvalue()
|
37 |
base64_image = base64.b64encode(image_byte_arr).decode('utf-8')
|