eusholli commited on
Commit
1d7d4c7
1 Parent(s): 7abfd20

stop webrtc output, put input, output frames at top

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -206,11 +206,13 @@ col1, col2 = st.columns(2)
206
 
207
  with col1:
208
  st.header("Input Stream")
209
- st.subheader("input")
 
 
210
  # WebRTC streamer to get video input from the webcam
211
  webrtc_ctx = webrtc_streamer(
212
  key="input-webcam",
213
- mode=WebRtcMode.SENDRECV,
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
- st.subheader("Input Frame")
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