Spaces:
Sleeping
Sleeping
File size: 297 Bytes
febf97f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import cv2
import streamlit as st
st.title("webcam live feed")
run = st.checkbox('Run')
FRAME_WINDOW = st.image([])
camera = cv2.VideoCapture(0)
while run:
_, frame = camera.read()
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
FRAME_WINDOW.image(frame)
else:
st.write('Stopped') |