I recently created a streamlit app and deployed it here i.e. community cloud.
One of the features were that people can acknowledge and show themselves on the PCA graph and see others too.
This was done by saving their records on a local file.
Today, I only see the 2 records on the graph that were in my github repo at the time of deployment.
Others simply disappeared.
How?
Does streamlit refreshes the app every few hours to the repo verion?
And if so, do I need to make a commit, push for every new record in the local file?
Local files may be deleted at any time. Only the files from your GitHub repository are guaranteed. Any time your app reboots, the local files start from a fresh clone of your repository. This may happen if there is a system update, migration, or incident (or if you change an app setting, update something in your repo, or manually trigger a reboot).
So every time I make any streamlit app, I have to make sure that I either push the new incoming records to github or use a SQL server or some other online Data base.
Basically, yes. If your app is doing some read/write operation that you want to persist for more than a session, that data should be hosted and served somewhere, like a database. (Or if you do a custom hosting solution where you control the hard disk of your app, you can do whatever. )
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.