Hi all!
Just to start with my problem in mind:
After my app on Streamlit Cloud reboots, data downloaded and files created on the run are lost.
I’m fairly new to SQL and databases in general and I’m building a CRUD streamlit app with SQLite.
The main ideia is that the user uploads some videos, the backend run some object detection and then persist the data collected from inference into a local SQLite database and download the videos (in the database the filepath is referenced in a videos table).
After the first video upload, two folder structures are created:
...
database/
└── my_sqlite.db (binaries)
videos/
└── video-<date_of_upload>-<user_name>.mp4
...
When my app go to sleep (to save resources) and then reboots, the database and videos are lost.
It is bad for the user, since their data that was on the cloud, now is lost.
[Questions]
- Is there some way to keep this data between reboots?
- Is this the best practice? Or should I do this with some online database service that when my app reboots, the data is kept and I just have to stablish the connection again?