Spaces:
Runtime error
Runtime error
Allow 3 channel images only
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ with st.spinner("Wait for loading a model..."):
|
|
| 40 |
# Create a canvas component.
|
| 41 |
image = None
|
| 42 |
if image_path:
|
| 43 |
-
image = Image.open(image_path)
|
| 44 |
canvas_height, canvas_width = 600, 600
|
| 45 |
pos_color, neg_color = "#3498DB", "#C70039"
|
| 46 |
st.title("Canvas:")
|
|
|
|
| 40 |
# Create a canvas component.
|
| 41 |
image = None
|
| 42 |
if image_path:
|
| 43 |
+
image = Image.open(image_path).convert("RGB")
|
| 44 |
canvas_height, canvas_width = 600, 600
|
| 45 |
pos_color, neg_color = "#3498DB", "#C70039"
|
| 46 |
st.title("Canvas:")
|