Kyle Dampier commited on
Commit
1a84122
1 Parent(s): e3171cd

changed drawing size and emoji preview

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +3 -3
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: MLMondayDemo Week1
3
- emoji: 😻
4
  colorFrom: indigo
5
  colorTo: blue
6
  sdk: streamlit
 
1
  ---
2
  title: MLMondayDemo Week1
3
+ emoji: ✍️
4
  colorFrom: indigo
5
  colorTo: blue
6
  sdk: streamlit
app.py CHANGED
@@ -27,8 +27,8 @@ canvas_result = st_canvas(
27
  background_color='#000000',
28
  #background_image=Image.open(bg_image) if bg_image else None,
29
  update_streamlit=realtime_update,
30
- height=224,
31
- width=224,
32
  drawing_mode='freedraw',
33
  key="canvas",
34
  )
@@ -43,7 +43,7 @@ if canvas_result.image_data is not None:
43
  im = ImageOps.grayscale(Image.fromarray(canvas_result.image_data.astype(
44
  'uint8'), mode="RGBA")).resize((28, 28))
45
  # img_data = im.
46
- st.image(im, width=224)
47
 
48
  data = img_to_array(im)
49
  data = data / 255
 
27
  background_color='#000000',
28
  #background_image=Image.open(bg_image) if bg_image else None,
29
  update_streamlit=realtime_update,
30
+ height=28*9,
31
+ width=28*9,
32
  drawing_mode='freedraw',
33
  key="canvas",
34
  )
 
43
  im = ImageOps.grayscale(Image.fromarray(canvas_result.image_data.astype(
44
  'uint8'), mode="RGBA")).resize((28, 28))
45
  # img_data = im.
46
+ st.image(im, width=28*9)
47
 
48
  data = img_to_array(im)
49
  data = data / 255