diff --git a/python/api-examples-source/widget.camera_input.py b/python/api-examples-source/widget.camera_input.py index a69b499e7..89c877452 100644 --- a/python/api-examples-source/widget.camera_input.py +++ b/python/api-examples-source/widget.camera_input.py @@ -1,6 +1,7 @@ import streamlit as st -picture = st.camera_input("Take a picture") +enable = st.checkbox("Enable camera") +picture = st.camera_input("Take a picture", disabled=not enable) if picture: st.image(picture)