Impact 2024: The Industrial Data and AI Conference for and by Users | Nominate Speakers Now for a Ch...
Currently Cognite’s Streamlit apps have issues with for example:with st.spinner('Wait for it...'): time.sleep(5)st.success('Done!')The code itself should wait 5 seconds before writing out Done!, but is executed instantly. Another example is when you try to make your application responsive while waiting for some data to arrive from a remote location. For example, when you want to print out a wait message for the user because sometimes it takes some seconds to load the data, but the app doesn't work as intended. In the following example I am trying to print out a message while waiting for the function to finish, but it fails:call_func_button = st.button("Call function with current parameters", key="button_func_call")if call_func_button: func_call = example_function.call(data=input_data, wait=False) st.info("Waiting for function...") while func_call.status == "Running": func_call.update() if func_call.status == "Failed": st.error("Function failed to run!")
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.