import streamlit as st from streamlit_drawable_canvas import st_canvas st.title("Canvas Drawing App") canvas_result = st_canvas( fill_color="rgba(255, 165, 0, 0.3)", # Filled color stroke_width=3, # Stroke width stroke_color="#000000", # Stroke color background_color="#ffffff", # Canvas background color update_streamlit=True, height=500, width=500, drawing_mode="freedraw", key="canvas", ) if canvas_result.image_data is not None: st.image(canvas_result.image_data)