Use local file path to access the file when the app is on the air

Hi, I am deploying my streamlit app to the cloud. I need to upload a large file (about 3 to 9GB) to my app and analyze it. Since the size of the file exceeds the storage of RAM, I cannot use the function file_uploader. I am trying to ask the user to input something like a local URL and my app will use the URL to access the file locally. Is there anyway in streamlit to use the local URL to find the file? Forgive me if it is a naive question. Thanks in advance.

The screen shot of my input widget is attached for your convenience.

Hi @RickLin,

Thanks for posting!

When deployed with Streamlit Cloud, your app won’t have access to the local machine. You would probably be able to implement this using a different hosting setup if the local machine and the server hosting the app are in the same network and have shared resources, but at that point, you might find it easier to just use a hosting service that can support the large file size.

Caroline :balloon:

Here comes another question. The PyPI I used to analyze the file only supports path inputs instead of the file input. That’s also another reason I cannot use file_uploader. Hence, a hosting service supporting large file sizes might not be a good solution.