Streamlit cloud deployment app fails to load a page that uses data stored in git LFS
Note that the same app runs locally without any issues.

My app has 3 pages (using st_pages). Deployed successfully to the streamlit cloud, I can open the “About” and “Movie Visualizer” pages successfully. But when I try to open the “Movie Explorer” page, it gives me cryptic error: “Oh no. Error running app”, nothing shown in console logs.
This page try to load (and cache) a dataframe from a 75MB parquet file stored in Git LFS.

I’m not sure if this is an LFS issue or a memory issue (75MB is not big by any standard).
Any help would be appreciated.

Okay, I managed to figure out the issue. The problem was that I had TF-IDF embeddings of 75MB stored in a parquet file, however when uncompressed it’d consume memory over 1.2GB (!!) which is more than what Streamlit community cloud offers, and it just crashed.

I made changes to load the TF-IDF embeddings only if the app is run locally (I am using a boolean to set this while deploying it to false.). I’m not sure if there is any better way to figure out if the app is running locally or in the cloud, if anyone knows, please let me know.

Here is the deployed app:
Github repo: GitHub - sssingh/movie-recommender: Natural Language Processing (NLP) based a movie recommender app

Having said that, I believe, Streamlit should throw an out-of-memory error and log it in the console, which would make life much easier. At present, it just goes silent with no error whatsoever.

cheers :slight_smile:

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