Logan Zoellner commited on
Commit
106b685
1 Parent(s): bf7395c
Files changed (1) hide show
  1. app.py +2 -2
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("out.jpg")
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)