Hi ,
I have a requirement where I need to bring some data from SQL Server and make available thru download button. I can able to achieve this requirement.
But the real problem is , when the user hits submit form button the program will do all the ELT work behind and make available download button , this might take more than 20 seconds.
In this 20 seconds mean while , user is going to another page to do some activity.
But when the user comes back to page1 , everything is like nothing is happened.
Could anyone have any suggestions how to achieve this. Much appreciated , Thank you!.
Here is my code
#app.py
import streamlit as st
import pandas as pd
import time
st.title('Streamlit Multi Page app reruns')
colordata = {'Color':['White','Yellow','Black','Green','Purple']}
colordf = pd.DataFrame(colordata)
with st.form(key = 'colorchoice'):
choice = st.selectbox('Select your color' , colordf)
choicesubmitted = st.form_submit_button('Submit')
if choicesubmitted:
f'You have seleted : {choice} color'
for i in range(20,0,-1):
time.sleep(1)
i
import streamlit as st
food = st.selectbox('Select your choice ', options=['Burger','Nuggets','Fries','Soda'])
f'You have selected {food}'