Update app.py
Browse files
app.py
CHANGED
@@ -144,14 +144,15 @@ canvas_result = st_canvas(
|
|
144 |
key="full_app",
|
145 |
)
|
146 |
|
|
|
147 |
# Do something interesting with the image data and paths
|
148 |
if canvas_result.image_data is not None:
|
|
|
149 |
image = canvas_result.image_data
|
150 |
image1 = image.copy()
|
151 |
-
image1 =
|
152 |
-
image1 = cv2.
|
153 |
-
image1
|
154 |
-
# Convert to uint8 format (bytes)
|
155 |
st.image(image1)
|
156 |
|
157 |
|
|
|
144 |
key="full_app",
|
145 |
)
|
146 |
|
147 |
+
# Do something interesting with the image data and paths
|
148 |
# Do something interesting with the image data and paths
|
149 |
if canvas_result.image_data is not None:
|
150 |
+
#st.image(canvas_result.image_data)
|
151 |
image = canvas_result.image_data
|
152 |
image1 = image.copy()
|
153 |
+
image1 = image1.astype('uint8')
|
154 |
+
image1 = cv2.cvtColor(image1,cv2.COLOR_BGR2GRAY)
|
155 |
+
image1 = cv2.resize(image1,(28,28))
|
|
|
156 |
st.image(image1)
|
157 |
|
158 |
|