curt-park commited on
Commit
2535e18
·
1 Parent(s): 96d7d21

Allow 3 channel images only

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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:")