How to download large model files? Error deploying app : No such file or directory

Hi,

I’m struggling on deploying my first streamlit app.
It works on the local way and it’s very difficult for me to understand where are the problems.
Here the things I’ve already corrected.
I’ve already add the requirement files and correct some stuff.

But now I realized that my ā€œcheckpoint_vgg16_3.data-00000-of-00001ā€ file is too big for GITHUB.
So I put this file on my GoogleDrive but I don’t understand how to use it in the file ā€œdonnees.pyā€ for the ā€œdef load_vgg16_cnn_modelā€ (line 116 )
I think it’s the problem but myabe it’s something else.

Please note that I am able to run the application using my local machine. It would be really helpful if you can look into this and let me know if there is something that I am missing or what needs to be done to deploy the app.

I am sharing the link to my public repo : git repo

Thank you

Hi @Mrss,

To access a file stored in Google Drive from your Streamlit app, you’ll probably want to use Google Drive’s API – there’s a pretty thorough writeup here that covers how to download files via that API.

If the file is under 1GB, I think you’d have an easier time using Git LFS to store it instead

Hi @Caroline

Thank you.
With my own research I found the solution of Git LFS. To be honest I’m very new in using all those tools.

I’ve already installed LFS in my computer. But I don’t really understand how to use it. In the cmd command, it say that GIT LFS is initalized but I don’t understanf where to put my file. My file is 59 106Ko.

There’s a decent tutorial here on using Git LFS and this article is pretty helpful as well. Basically, you tell Git LFS what type of files you want it to manage – e.g. if you want to track all .png files with Git LFS:

git lfs track "*.png"

Thank you very much @Caroline. The tutorials helps me a lot.

I tried to do a git push and here the message I have :slight_smile:

Does someone have an idea of the problem ?
I just want to push one file of 59 106Ko. The other files are already on my repo

Git LFS gives you 1 GB for free, I believe – it sounds like you might be over that limit

1 Like

Oh ok thank you.
I thought GIT LFS allows more space.
I’m going to find an other solutions.