App is Disconnecting with error

I have this app, which is able to get deployed. This app has been in sleep mode and when I again tried deploying and running this app, the steamlit got disconnected and returned “Error Running App”.

However, When I am running the app in local, there is no issue. May I seek your help on why steamlit is disconnecting when running the model.

https://share.streamlit.io/shubh2016shiv/japanese-businesscard-recognition/main/japaneseBusinessCard_App.py

github: GitHub - shubh2016shiv/japanese-businessCard-Recognition

NOTE: app is able to get deployed but when I am running the model, steamlit gets disconnected but when I am running the same code in local after cloning from github, it is running fine.

Hi @Shubham_Singh,

I took a look at your app and GitHub, and I noticed that you are using Torch. Torch is a very large package and it’s causing you to go over the memory limits on your app.

There are a few things you can try, but I see in the logs of the app that a module you’re using is optimized for GPUs. Our Cloud platform doesn’t have access to GPUs right now, only CPU access is available and this might be causing some issues in running your app on the cloud as well.

Here is a link to some tips you can try: Common app problems: Resource limits

Also, I would advise using the new st.singleton or st.memo in your app instead of st.cache, here is a link to some info on those: New experimental primitives for caching (that make your app 10x faster!)

Happy Streamlit-ing!
Marisa

2 Likes