Showing Error after running for a while

I have been trying to deploy my real time gesture recognition app, for some time it is working, after a few minutes the folowing is showing:

[manager] The service has encountered an error while checking the health of the Streamlit app: Get “http://localhost:8501/healthz”: read tcp 127.0.0.1:37476->127.0.0.1:8501: read: connection reset by peer

this is the error statement shown, my deep learning model is of size 6.89 MB, so I don’t think it should be size issue , please help with what I am missing here.

https://github.com/its-agni/HGR-using-LSTM-and-Mediapipe

https://share.streamlit.io/its-agni/hgr-using-lstm-and-mediapipe/main/camera.py

An update:
I found that it was a Thread missing issue, but now when I m running it’s still showing this error without any other warnings:

[manager] The service has encountered an error while checking the health of the Streamlit app: Get "http://localhost:8501/healthz": read tcp 127.0.0.1:55416->127.0.0.1:8501: read: connection reset by peer
[manager] Streamlit server consistently failed status checks
[manager] Please fix the errors, push an update to the git repo, or reboot the app.