Spaces:
Runtime error
Runtime error
Commit
·
941bc2f
1
Parent(s):
bc359a1
Update app.py
Browse files
app.py
CHANGED
@@ -53,8 +53,7 @@ def process_sketch(canvas_data, binary_matrixes):
|
|
53 |
image_data = base64.b64decode(base64_img.split(',')[1])
|
54 |
image = Image.open(BytesIO(image_data))
|
55 |
im2arr = np.array(image)
|
56 |
-
|
57 |
-
colors = [tuple(int(color.lstrip('#')[i:i+2], 16) for i in (0, 2, 4)) for color in canvas_data['colors']]
|
58 |
colors_fixed = []
|
59 |
for color in colors:
|
60 |
r, g, b = color
|
|
|
53 |
image_data = base64.b64decode(base64_img.split(',')[1])
|
54 |
image = Image.open(BytesIO(image_data))
|
55 |
im2arr = np.array(image)
|
56 |
+
colors = [tuple(map(int, rgb[4:-1].split(','))) for rgb in canvas_data['colors']]
|
|
|
57 |
colors_fixed = []
|
58 |
for color in colors:
|
59 |
r, g, b = color
|