Alternative version of st.camera_input which returns the webcam images live, without any button press needed
pip install streamlit-camera-input-live
import streamlit as st
from camera_input_live import camera_input_live
image = camera_input_live()
if image:
st.image(image)