corvo7 commited on
Commit
eaed159
·
verified ·
1 Parent(s): 1e87e85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ canvas_result = st_canvas(
32
 
33
  if canvas_result.image_data is not None:
34
  st.image(canvas_result.image_data, caption="Original Drawing")
35
- img = cv2.cvtColor(canvas_result.image_data.astype("uint8"), cv2.cv2.COLOR_RGBA2GRAY)
36
  img = 255 - img
37
  img_resized = cv2.resize(img, (28, 28))
38
  img_normalized = img_resized / 255.0
 
32
 
33
  if canvas_result.image_data is not None:
34
  st.image(canvas_result.image_data, caption="Original Drawing")
35
+ img = cv2.cvtColor(canvas_result.image_data.astype("uint8"), cv2.COLOR_RGBA2GRAY)
36
  img = 255 - img
37
  img_resized = cv2.resize(img, (28, 28))
38
  img_normalized = img_resized / 255.0