Hello Streamlit community,
I am working on a project that uses easyocr to detect the dimension from the CAD drawing and append those selected dimension to the editable dataframe. This app is running locally for now.
Whenever I delete or edit the dataframe the previosuly stored stale value reappears in the dataframe I have tried multiple ways from the online forum to fix it but I couldn’t.
This is the part of the code that uses df.
# When we have two dimensions, add the pair to the main list
** if len(st.session_state.temp) == 2:**
** st.session_state.dimension.append(st.session_state.temp[:])**
** st.session_state.temp = **
** # st.write(st.session_state.dimension)**
** if st.session_state.dimension:**
** df = pd.DataFrame(st.session_state.dimension, columns=[‘Width’, ‘Height’])**
** df_sorted = df.sort_index(ascending=False)**
Looking forward to your valuable input.