gurwindersingh commited on
Commit
66df1a4
·
1 Parent(s): d58f394

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -30,6 +30,8 @@ st.write('Encoding Complete')
30
  cap = cv2.VideoCapture(0) # Use 0 for the default camera
31
  while True:
32
  ret, frame = cap.read()
 
 
33
 
34
  if ret:
35
  imgS = cv2.resize(frame, (0, 0), None, 0.25, 0.25)
@@ -61,14 +63,6 @@ while True:
61
  else:
62
  st.write("Data not updated")
63
 
64
- # Show the flipped frame
65
- frame = cv2.flip(frame, 1) # Flip horizontally
66
- st.image(frame)
67
-
68
- if cv2.waitKey(1) & 0xFF == ord('q'):
69
- break
70
- else:
71
- break
72
-
73
- cap.release()
74
- cv2.destroyAllWindows()
 
30
  cap = cv2.VideoCapture(0) # Use 0 for the default camera
31
  while True:
32
  ret, frame = cap.read()
33
+ frame = cv2.flip(frame, 1) # Flip horizontally
34
+ st.image(frame)
35
 
36
  if ret:
37
  imgS = cv2.resize(frame, (0, 0), None, 0.25, 0.25)
 
63
  else:
64
  st.write("Data not updated")
65
 
66
+ st.image(image)
67
+ if bytes_data is None:
68
+ st.stop()