Spaces:
Sleeping
Sleeping
File size: 570 Bytes
8f3b263 6a6cd90 a4e7061 6a6cd90 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
from streamlit_webrtc import webrtc_streamer, VideoTransformerBase
import av
import cv2
st.title("KAISA APP HAI YEH BSDK")
# Function to process each video frame
class VideoTransforms(VideoTransformerBase):
def transform(self,frame):
img = frame.to_ndarray(format="bgr24")
# (Optional) Process the frame (e.g., apply filters)
img=cv2.flip(img,1)
# Return the processed frame
return img
# WebRTC streamer component
webrtc_streamer(
key="example",
video_transformer_factory=VideoTransforms,
) |