jarondon82 commited on
Commit
344e1a0
·
1 Parent(s): c4ca706

Fix syntax error in streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +5 -2
streamlit_app.py CHANGED
@@ -752,7 +752,8 @@ def main():
752
  cap = cv2.VideoCapture(0) # 0 is typically the main webcam
753
 
754
  if not cap.isOpened():
755
- st.error("Could not access webcam. Make sure it's connected and not being used by another application.")`r`n st.warning("?? Note: If you're using this app on Hugging Face Spaces, webcam access is not supported. Try running this app locally for webcam features.")
 
756
  st.session_state.camera_running = False
757
  else:
758
  # Display real-time video with face detection
@@ -1007,7 +1008,8 @@ def main():
1007
  cap = cv2.VideoCapture(0) # 0 is typically the main webcam
1008
 
1009
  if not cap.isOpened():
1010
- st.error("Could not access webcam. Make sure it's connected and not being used by another application.")`r`n st.warning("?? Note: If you're using this app on Hugging Face Spaces, webcam access is not supported. Try running this app locally for webcam features.")
 
1011
  st.session_state.feature_camera_running = False
1012
  else:
1013
  # Display real-time video with face and feature detection
@@ -2198,3 +2200,4 @@ if __name__ == "__main__":
2198
 
2199
 
2200
 
 
 
752
  cap = cv2.VideoCapture(0) # 0 is typically the main webcam
753
 
754
  if not cap.isOpened():
755
+ st.error("Could not access webcam. Make sure it's connected and not being used by another application.")
756
+ st.warning("⚠️ Note: If you're using this app on Hugging Face Spaces, webcam access is not supported. Try running this app locally for webcam features.")
757
  st.session_state.camera_running = False
758
  else:
759
  # Display real-time video with face detection
 
1008
  cap = cv2.VideoCapture(0) # 0 is typically the main webcam
1009
 
1010
  if not cap.isOpened():
1011
+ st.error("Could not access webcam. Make sure it's connected and not being used by another application.")
1012
+ st.warning("⚠️ Note: If you're using this app on Hugging Face Spaces, webcam access is not supported. Try running this app locally for webcam features.")
1013
  st.session_state.feature_camera_running = False
1014
  else:
1015
  # Display real-time video with face and feature detection
 
2200
 
2201
 
2202
 
2203
+