Form_submit_button refreshes the entire container

def main():
    results = "false"
 
    with st.sidebar:
        logo_image = r"Preformatted textlogo.png"
        st.image(logo_image, width=100)

        # Input fields for user inputs
        domain_name = st.text_input("Enter the data domain:",placeholder="Example: Supply Chain, Commercial....")

        option = st.selectbox(
            "Choose the tool for fetching technical metadata:",
            ("Collibra", "Informatica CDGC"),
            index=None,
            placeholder="Select the tool...",
        )

        if option == "Collibra":
            asset_id = st.text_input("Enter the Collibra table UUID:")

        if option == "Informatica CDGC":
            # Create a file uploader for Excel files
            uploaded_asset_file = st.file_uploader("Upload the Informatica CDGC asset template:", type=["xls", "xlsx"])
        
        # File uploader for PDF file
        uploaded_file = st.file_uploader("Upload the contextual document:", type="pdf")

        runbtn = st.button("Generate results")

        if runbtn:

            results = "true"

            if option == "Collibra":
                collibra_column_descriptions = collibra_onclick(domain_name,asset_id,uploaded_file)

            if option == "Informatica CDGC":
                informatica_column_descriptions = informatica_onclick(domain_name,uploaded_file,uploaded_asset_file)
                description_display = informatica_column_descriptions[['Parent: Technical Data Set','Name','Description']]
                description_display.rename(columns={'Parent: Technical Data Set':'Table Name','Name':'Column Name','Description':'Column Description'},inplace=True)
                description_display.insert(0, 'Sr No.', description_display.index + 1)

    with st.container():

        if results == "true" :

            if option == "Collibra":
                with st.form("my_form"):
                    edited_df = st.data_editor(collibra_column_descriptions)
                    submitted = st.form_submit_button("Download Curated Asset Data")

                if submitted:
                    st.write("Edited dataframe:", edited_df)
                        
                # download_excel(edited_df)

            if option == "Informatica CDGC":
                st.dataframe(description_display.head(50),width=1000,hide_index=True)
                download_excel(informatica_column_descriptions)

Once I click on the β€œDownload Curated Asset Data”, it refreshes the content within the container and it shows blank page with only the sidebar.