You can try re-installing the opencv package. It’s best to use python virtual env when installing other libraries as it may cause issues with the existing ones.
Also, your query isn’t related to Streamlit but to the Python setup. You can read more here .