stop webrtc output, put input, output frames at top
Browse files
app.py
CHANGED
|
@@ -206,11 +206,13 @@ col1, col2 = st.columns(2)
|
|
| 206 |
|
| 207 |
with col1:
|
| 208 |
st.header("Input Stream")
|
| 209 |
-
st.
|
|
|
|
|
|
|
| 210 |
# WebRTC streamer to get video input from the webcam
|
| 211 |
webrtc_ctx = webrtc_streamer(
|
| 212 |
key="input-webcam",
|
| 213 |
-
mode=WebRtcMode.
|
| 214 |
rtc_configuration=ice_servers,
|
| 215 |
video_frame_callback=video_frame_callback,
|
| 216 |
media_stream_constraints={"video": True, "audio": False},
|
|
@@ -256,12 +258,11 @@ st.markdown(
|
|
| 256 |
|
| 257 |
|
| 258 |
def analysis_init():
|
| 259 |
-
global analysis_time, show_labels, labels_placeholder, input_placeholder, output_placeholder
|
| 260 |
|
| 261 |
with col2:
|
| 262 |
st.header("Analysis")
|
| 263 |
-
|
| 264 |
-
input_placeholder = st.empty() # Placeholder for input frame
|
| 265 |
|
| 266 |
st.subheader("Output Frame")
|
| 267 |
output_placeholder = st.empty() # Placeholder for output frame
|
|
|
|
| 206 |
|
| 207 |
with col1:
|
| 208 |
st.header("Input Stream")
|
| 209 |
+
input_subheader = st.empty()
|
| 210 |
+
input_placeholder = st.empty() # Placeholder for input frame
|
| 211 |
+
st.subheader("Input Options")
|
| 212 |
# WebRTC streamer to get video input from the webcam
|
| 213 |
webrtc_ctx = webrtc_streamer(
|
| 214 |
key="input-webcam",
|
| 215 |
+
mode=WebRtcMode.SENDONLY,
|
| 216 |
rtc_configuration=ice_servers,
|
| 217 |
video_frame_callback=video_frame_callback,
|
| 218 |
media_stream_constraints={"video": True, "audio": False},
|
|
|
|
| 258 |
|
| 259 |
|
| 260 |
def analysis_init():
|
| 261 |
+
global analysis_time, show_labels, labels_placeholder, input_subheader, input_placeholder, output_placeholder
|
| 262 |
|
| 263 |
with col2:
|
| 264 |
st.header("Analysis")
|
| 265 |
+
input_subheader.subheader("Input Frame")
|
|
|
|
| 266 |
|
| 267 |
st.subheader("Output Frame")
|
| 268 |
output_placeholder = st.empty() # Placeholder for output frame
|