SS8297 commited on
Commit
febf97f
·
1 Parent(s): 9b4f09c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import cv2
2
+ import streamlit as st
3
+
4
+ st.title("webcam live feed")
5
+ run = st.checkbox('Run')
6
+ FRAME_WINDOW = st.image([])
7
+ camera = cv2.VideoCapture(0)
8
+
9
+ while run:
10
+ _, frame = camera.read()
11
+ frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
12
+ FRAME_WINDOW.image(frame)
13
+ else:
14
+ st.write('Stopped')