my error was calling videoCapture twice, once outside of my function, plus an error with image path witch caused the
ERROR in app: Exception on /detect_faces [POST]
making the whole program stop
-fixing the image path and deleting video capture outside of the function fixed the error, and for this situation cv2.VideoCapture(0,cv2.CAP_DSHOW) was correct :)