Spaces:
Running
on
T4
Running
on
T4
fix: handle non-sketch inputs
Browse files
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 |
|