awacke1 commited on
Commit
6c3e750
1 Parent(s): 5693d33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -34,8 +34,9 @@ def main():
34
 
35
 
36
  while True:
37
- image = camera_input_live()
38
-
 
39
  if image is not None:
40
  st.image(image)
41
 
@@ -52,7 +53,10 @@ def main():
52
  st.sidebar.markdown("## Captured Images")
53
  st.sidebar.markdown(sidebar_html, unsafe_allow_html=True)
54
 
55
- time.sleep(0.1) # Add a short delay to reduce CPU usage
 
 
 
56
 
57
  if __name__ == "__main__":
58
  main()
 
34
 
35
 
36
  while True:
37
+ try:
38
+ image = camera_input_live()
39
+
40
  if image is not None:
41
  st.image(image)
42
 
 
53
  st.sidebar.markdown("## Captured Images")
54
  st.sidebar.markdown(sidebar_html, unsafe_allow_html=True)
55
 
56
+ time.sleep(0.1) # Add a short delay to reduce CPU usage
57
+
58
+ except:
59
+ st.write('.')
60
 
61
  if __name__ == "__main__":
62
  main()