import streamlit as st from transformers import pipeline enable = st.checkbox("Enable camera") picture = st.camera_input("Take a picture", disabled=not enable) if picture: out = pipeline(picture) st.json(out)