jarondon82 commited on
Commit
e632598
·
1 Parent(s): 41c3e66

Agregar mensaje informativo sobre acceso a webcam en Hugging Face Spaces

Browse files
Files changed (1) hide show
  1. streamlit_app.py +3 -2
streamlit_app.py CHANGED
@@ -752,7 +752,7 @@ 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.")
756
  st.session_state.camera_running = False
757
  else:
758
  # Display real-time video with face detection
@@ -1007,7 +1007,7 @@ 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.")
1011
  st.session_state.feature_camera_running = False
1012
  else:
1013
  # Display real-time video with face and feature detection
@@ -2197,3 +2197,4 @@ if __name__ == "__main__":
2197
 
2198
 
2199
 
 
 
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
  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
 
2197
 
2198
 
2199
 
2200
+