stop webrtc output, put input, output frames at top
Browse files
app.py
CHANGED
|
@@ -170,11 +170,13 @@ col1, col2 = st.columns(2)
|
|
| 170 |
|
| 171 |
with col1:
|
| 172 |
st.header("Input Stream")
|
| 173 |
-
st.
|
|
|
|
|
|
|
| 174 |
# WebRTC streamer to get video input from the webcam
|
| 175 |
webrtc_ctx = webrtc_streamer(
|
| 176 |
key="input-webcam",
|
| 177 |
-
mode=WebRtcMode.
|
| 178 |
rtc_configuration=ice_servers,
|
| 179 |
video_frame_callback=video_frame_callback,
|
| 180 |
media_stream_constraints={"video": True, "audio": False},
|
|
@@ -220,12 +222,11 @@ st.markdown(
|
|
| 220 |
|
| 221 |
|
| 222 |
def analysis_init():
|
| 223 |
-
global analysis_time, show_labels, labels_placeholder, input_placeholder, output_placeholder
|
| 224 |
|
| 225 |
with col2:
|
| 226 |
st.header("Analysis")
|
| 227 |
-
|
| 228 |
-
input_placeholder = st.empty() # Placeholder for input frame
|
| 229 |
|
| 230 |
st.subheader("Output Frame")
|
| 231 |
output_placeholder = st.empty() # Placeholder for output frame
|
|
|
|
| 170 |
|
| 171 |
with col1:
|
| 172 |
st.header("Input Stream")
|
| 173 |
+
input_subheader = st.empty()
|
| 174 |
+
input_placeholder = st.empty() # Placeholder for input frame
|
| 175 |
+
st.subheader("Input Options")
|
| 176 |
# WebRTC streamer to get video input from the webcam
|
| 177 |
webrtc_ctx = webrtc_streamer(
|
| 178 |
key="input-webcam",
|
| 179 |
+
mode=WebRtcMode.SENDONLY,
|
| 180 |
rtc_configuration=ice_servers,
|
| 181 |
video_frame_callback=video_frame_callback,
|
| 182 |
media_stream_constraints={"video": True, "audio": False},
|
|
|
|
| 222 |
|
| 223 |
|
| 224 |
def analysis_init():
|
| 225 |
+
global analysis_time, show_labels, labels_placeholder, input_subheader, input_placeholder, output_placeholder
|
| 226 |
|
| 227 |
with col2:
|
| 228 |
st.header("Analysis")
|
| 229 |
+
input_subheader.subheader("Input Frame")
|
|
|
|
| 230 |
|
| 231 |
st.subheader("Output Frame")
|
| 232 |
output_placeholder = st.empty() # Placeholder for output frame
|