Spaces:
Runtime error
Runtime error
fouadmahmoud283-ai commited on
Commit ·
d00b834
1
Parent(s): 715ade4
fixing camera n1235
Browse files- src/streamlit_app.py +3 -1
src/streamlit_app.py
CHANGED
|
@@ -531,9 +531,11 @@ def main():
|
|
| 531 |
with st.spinner("🤖 Loading AI model..."):
|
| 532 |
st.session_state.model = load_model(conf_threshold)
|
| 533 |
|
|
|
|
|
|
|
| 534 |
webrtc_ctx = webrtc_streamer(
|
| 535 |
key="realtime_camera",
|
| 536 |
-
video_processor_factory=lambda: RealtimeVideoProcessor(
|
| 537 |
media_stream_constraints={"video": True, "audio": False},
|
| 538 |
async_processing=True,
|
| 539 |
rtc_configuration={
|
|
|
|
| 531 |
with st.spinner("🤖 Loading AI model..."):
|
| 532 |
st.session_state.model = load_model(conf_threshold)
|
| 533 |
|
| 534 |
+
model = st.session_state.model
|
| 535 |
+
|
| 536 |
webrtc_ctx = webrtc_streamer(
|
| 537 |
key="realtime_camera",
|
| 538 |
+
video_processor_factory=lambda: RealtimeVideoProcessor(model, conf_threshold),
|
| 539 |
media_stream_constraints={"video": True, "audio": False},
|
| 540 |
async_processing=True,
|
| 541 |
rtc_configuration={
|