Error when using Streamlit Cloud [Detectron2]

It was solved by adding this line:

You an find the needed import line in here: Installation — detectron2 0.6 documentation

Select the line based on your torch version or CPU if you are not using CUDA