AndrewLam489 commited on
Commit
2fe7b30
1 Parent(s): 662d6bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -4,17 +4,5 @@ import av
4
 
5
  st.title("Webcam Display Streamlit App")
6
 
7
- # Define the callback for transforming frames (without applying any filters)
8
- def transform(frame: av.VideoFrame):
9
- img = frame.to_ndarray(format="bgr24") # Convert to NumPy array (BGR format)
10
-
11
- # Simply return the image without applying any filters
12
- return av.VideoFrame.from_ndarray(img, format="bgr24")
13
-
14
- # Display the video stream
15
- webrtc_streamer(
16
- key="streamer",
17
- video_frame_callback=transform, # The transform function is only used to process frames
18
- sendback_audio=False, # We don't need audio in this case
19
- mode=WebRtcMode.SENDRECV, # Use WebRtcMode enum instead of string
20
  )
 
4
 
5
  st.title("Webcam Display Streamlit App")
6
 
7
+ webrtc_streamer(key="example")
 
 
 
 
 
 
 
 
 
 
 
 
8
  )