How to store streamlit app's input data in deta.sh cloud storage?

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. Are you running your app locally or is it deployed?
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform?
    b. Share the link to the public deployed app.
  3. Share the link to your app’s public GitHub repository (including a requirements file).
  4. Share the full text of the error message (not a screenshot).
  5. Share the Streamlit and Python versions.

I am working on a ML model Streamlit app on my local machine. It is a simple app to detect whether a given input x-ray image is pneumonia affected or not. I have implemented simple functionality such as login and signup for existing/new user by username and password.
I have used deta.sh cloud database for storing the data (i.e. user login details and images uploaded).
The app is working fine. However, the images I am uploading to check whether affected or not are getting stored on my local machine. I want them to get stored on deta.sh database.
Is there any way to do so? If yes, then do suggest how to do it.
My app is locally deployed on my local machine. Python version is 3.11 and Streamlit version is 1.28.0 as of now

uploaded_file = st.file_uploader("Choose an image...", type= ["jpg","png","jpeg"]) if uploaded_file is not None: st.image (uploaded_file, caption="uploaded Image", use_column_width=True) img = Image.open(uploaded_file).resize((255,255)) st.image (img, use_column_width=False) save_image_path='./upload_images/' + uploaded_file.name with open(save_image_path, 'wb') as f: f.write(uploaded_file.getbuffer()) if uploaded_file is not None: result = processed_img(save_image_path) e_path) if result == yes: else: st.error(result) st.success(result)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.