I've a app deployed but cant capture pictures when deployed

I’ve a app deployed but cant capture pictures when deployed

Hi @sir-cap,

Thank you for sharing your question with the community!

Your post is missing a code snippet and a link to your app’s GitHub repo. Please check out our guidelines on how to post an effective question here and update your post to help the community answer your question.

Thanks for letting me know
def get_camera_image():
# Call the st.camera_input() function with the ‘label’ argument
camera_image = st.camera_input(disabled=False,label=“Press the button ‘let’s capture your mood’ to start”)
return camera_image

    # Get the camera image
    camera_image = get_camera_image()

    # Create a button to start the mood detection
    check_mood_button = st.button("Let's capture your mood", help="Click here to start")
    st.markdown('</div>', unsafe_allow_html=True)
    cap = None  # Initialize the cap variable
    captured_image = st.empty()

    if check_mood_button:  # Corrected the variable name here
        loading = st.empty()
        loading.write("Capturing your mood...")
        countdown_start = True
        countdown_end_time = time.time() + countdown_time

        # Request camera access from the user

        cap = cv2.VideoCapture(0)
            # Initialize the camera
            cap = cv2.VideoCapture(0)
        except Exception as e:
            st.error(f"Failed to access camera: {e}")