Gosula commited on
Commit
9aac4d9
·
1 Parent(s): adee0ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -88,17 +88,18 @@ drawing_mode = st.sidebar.selectbox(
88
  realtime_update = st.sidebar.checkbox("Update in realtime", True)
89
  #create canvas component
90
  canvas_result = st_canvas(
91
- fill_color="white", # Set the canvas background color to white
92
  stroke_width=stroke_width,
93
  stroke_color=stroke_color,
 
 
94
  update_streamlit=realtime_update,
95
- height=28, # Set the canvas height to 28 pixels
96
- width=28, # Set the canvas width to 28 pixels
97
  drawing_mode=drawing_mode,
98
  display_toolbar=st.sidebar.checkbox("Display toolbar", True),
99
  key="full_app",
100
  )
101
-
102
  # Do something interesting with the image data and paths
103
  if canvas_result.image_data is not None:
104
  image = canvas_result.image_data
 
88
  realtime_update = st.sidebar.checkbox("Update in realtime", True)
89
  #create canvas component
90
  canvas_result = st_canvas(
91
+ fill_color="rgba(255, 165, 0, 0.3)", # Fixed fill color with some opacity
92
  stroke_width=stroke_width,
93
  stroke_color=stroke_color,
94
+ background_color=bg_color,
95
+ background_image=Image.open(bg_image) if bg_image else None,
96
  update_streamlit=realtime_update,
97
+ height=200,
98
+ width=200,
99
  drawing_mode=drawing_mode,
100
  display_toolbar=st.sidebar.checkbox("Display toolbar", True),
101
  key="full_app",
102
  )
 
103
  # Do something interesting with the image data and paths
104
  if canvas_result.image_data is not None:
105
  image = canvas_result.image_data