Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error in running Streamlit on GCP

Hi, 
I have developed a machine learning model and streaming application using Streamlit and OpenCV. This application includes real-time detection using an IP camera (via RTSP URL). When running the application locally, it functions correctly without errors, and I can see the real-time video feed and detection results. However, when deploying the same application on Google Cloud Platform (GCP), the application fails to open the video stream from the IP camera:

File "/usr/local/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script exec(code, module.__dict__)
File "/app/draft.py", line 31, in <module> assert cap.isOpened(), "Error opening video stream"

 

4 0 143