Have you had a look at the Heroku docs regarding camera interfaces? There is an add-on CameraTag
Heroku Cameratag
Also you might find self-hosting your flask app on an apache2 server a more successful solution. There are many tutorials and the process is not difficult.
Heroku is great, but with my experience with face_recognition specifically, if you don't pay for upgrades you will run into issues exceeding memory <550mb.
This link here is a great tutorial for self-hosting flask app.
Deploy Flask to Apache Server
Furthermore, it may be that Heroku cannot access the local camera peripheral or the device is no longer [0]
# Using OpenCV to capture from device 0.
self.stream = WebcamVideoStream(src = 0).start()
Have you tried modifying the src?
This may also be useful for your application.
Stream webcam to html OpenCV
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…