Help in live webcam using opencv on share streamlit deployment

While deploying app on streamlit share , we ended with error :-
cv2.error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor
Please help us with this issue.
we included packages.txt for OpenCV and requirements.txt also.
Our code is using - cam = cv2.VideoCapture(0) this as web cam feed.