Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
•
106b685
1
Parent(s):
bf7395c
try again
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import requests
|
|
4 |
import os
|
5 |
from base64 import b64decode
|
6 |
from PIL import Image
|
7 |
-
|
8 |
|
9 |
|
10 |
def generate_image(seed,psi):
|
@@ -16,7 +16,7 @@ def generate_image(seed,psi):
|
|
16 |
#wrong format, gah! convert to numpy array
|
17 |
header, encoded = img.split(",", 1)
|
18 |
data = b64decode(encoded)
|
19 |
-
image = Image.open(
|
20 |
image_np = np.array(image)
|
21 |
|
22 |
print('got img',img)
|
|
|
4 |
import os
|
5 |
from base64 import b64decode
|
6 |
from PIL import Image
|
7 |
+
import io
|
8 |
|
9 |
|
10 |
def generate_image(seed,psi):
|
|
|
16 |
#wrong format, gah! convert to numpy array
|
17 |
header, encoded = img.split(",", 1)
|
18 |
data = b64decode(encoded)
|
19 |
+
image = Image.open(io.BytesIO(data))
|
20 |
image_np = np.array(image)
|
21 |
|
22 |
print('got img',img)
|