watch_try_on / app.py
krisha06's picture
Create app.py
1d9ce38 verified
Raw
History Blame Contribute Delete
214 Bytes
import cv2
cap = cv2.VideoCapture(0) # Try other indices like 1 or 2 if 0 doesn't work
if not cap.isOpened():
print("Error: Could not access the camera.")
else:
print("Camera is working!")
cap.release()