The app simply uses a GAN to generate images that don’t exist. A click of any of the buttons in the app would load a pre-trained pickle from a web link and generate an image(s). It works fine when I run it locally but once deployed it does not work as expected.
That’s precisely the issue. Streamlit Cloud isn’t designed to host large, resource hungry deep learning models that ideally require a GPU for training and inference.
Your best bet would be to host your model as an inference server on a cloud provider like GCP, AWS, etc with an NVIDIA GPU and make REST API / gRPC calls to the inference endpoint from your Streamlit app.