nyanko7 commited on
Commit
9d68af7
1 Parent(s): bc84695

fix: handle non-sketch inputs

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -304,6 +304,9 @@ def get_color(n):
304
  def create_mixed_img(current, state, w=512, h=512):
305
  w, h = int(w), int(h)
306
  image_np = np.full([h, w, 4], 255)
 
 
 
307
  colors = get_color(len(state))
308
  idx = 0
309
 
 
304
  def create_mixed_img(current, state, w=512, h=512):
305
  w, h = int(w), int(h)
306
  image_np = np.full([h, w, 4], 255)
307
+ if state is None:
308
+ state = {}
309
+
310
  colors = get_color(len(state))
311
  idx = 0
312