Spaces:
Build error
Build error
Regino commited on
Commit ·
60845fc
1
Parent(s): a876981
fs
Browse filesFiles changed (2)
- src/streamlit_app.py+12-9
- train.ipynbAdded
133 unmodified lines13413513613713813914014114214310 unmodified lines1541551561531541551561571581591601611621621631641651663 unmodified lines170171172172173173174175176177178176177179180181182183133 unmodified lines # Convert the processed BGR image back to RGB for Streamlit/WebRTC display return cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB)
# app.py
# ... (previous code above) ...
# --- 4. Streamlit App Layout and WebRTC Stream ---st.title("Live Facial Emotion Recognition")
10 unmodified lines video_processor_factory=lambda: EmotionDetector(model, face_detector), media_stream_constraints={"video": True, "audio": False}, # Only video, no audio # Temporarily set async_processing to False for debugging. # If this works, it points to an asyncio interaction issue. For better performance, # you'd ideally re-enable async_processing=True later. async_processing=False, async_processing=False, # Keep this False for now to avoid asyncio errors # Optional: tries to auto-start. Can comment out if you prefer manual start. # desired_playing_state={"playing": True},
# --- ENHANCED RTC CONFIGURATION --- # Providing a robust list of public STUN servers for better NAT traversal # Providing a very robust list of public STUN servers for better NAT traversal rtc_configuration={ "iceServers": [ {"urls": ["stun:stun.l.google.com:19302"]},3 unmodified lines {"urls": ["stun:stun4.l.google.com:19302"]}, {"urls": ["stun:stun.services.mozilla.com"]}, {"urls": ["stun:global.stun.twilio.com:3478"]}, {"urls": ["stun:stun.nextcloud.com:3478"]}, # Added another {"urls": ["stun:stun.schlund.de"]}, # Added another {"urls": ["stun:stun.nextcloud.com:3478"]}, {"urls": ["stun:stun.schlund.de"]}, {"urls": ["stun:stun.stunprotocol.org"]}, # Added another {"urls": ["stun:stunserver.org"]}, # Added another ] }, # For more detailed debugging in the browser console, uncomment the line below. # log_level="debug", # --- Enable Debug Logging --- log_level="debug", # <--- CRITICAL FOR DIAGNOSIS)
# Provide feedback based on the stream statesrc/streamlit_app.py+12-9
train.ipynbAdded