How to download file in streamlit

@czubert
I didn’t know was need to create this folder. But now i did and still didn’t worked.

12

and also put the code from here streamlit download button ($2106399) · Snippets · Snippets · GitLab and the part where i want located the donwload_button at the main code:

        tmp_download_link = download_button(df4,f'{cg_result}.csv', button_text='Donwload Cg Dataframe')
        st.markdown(tmp_download_link, unsafe_allow_html=True)

where:

df4 is the dataframe i want to able the user donwload
cg_result the filename i want to show to the user