Streamlit App is crashing during inference

My app is crashing after I upload the images and pass it to the model for processing.

It first showed this error msg on console:
The service has encountered an error while checking the health of the Streamlit app: Get “http://localhost:8501/healthz”: read tcp> read: connection reset by peer

I rebooted the app but now as soon as I upload images and the model process it, the app crashes.

How can I solve this problem?

App Link:
GitHub: GitHub - nehaejaz/anomaly-detection-thesis

Hi @nehaejaz, and welcome to our forums! We’re thrilled to have you! :hugs:

Your app seems to be set up for GPU use with dependencies like CUDA, cuDNN, PyTorch, and NVIDIA libraries, indicating it’s optimized for GPU inference.

Streamlit Community Cloud does not yet support GPU computations, which may lead to such errors or crashes for GPU-optimized apps.

You might want to consider optimizing your app for CPU processing if possible. If not, you may explore alternative deployment platforms that offer GPU support, such as Google Cloud Run, Azure, and PaperSpace, among others.

I hope that helps,