I can`t see the window of the live video on my app

Hello, I deployed a Fire detection model with yolov8, it detects fire and send a whatsapp message using twilio library to the user if there is a fire, then I created a streamlit app. I used cv2.videocapture for live video in the beginning and it worked fine on my local pc but I found that it don`t work on streamlit server. So I tried to use streamlit_webrtc. After updating the code, when I press detect button there is nothing happen, I cant see the live video and anything, and I checked the logs for any error but there is not any errors. So please if you can help in this problem
and this my code to have a look. code

Hello @hossam_rizk,

Using streamlit-webrtc is indeed the right approach for handling live video feeds within Streamlit apps.

Example of how to use streamlit-webrtc to display a live video feed:

import streamlit as st
from streamlit_webrtc import webrtc_streamer

def main():
    st.header("Fire Detection System")
    st.write("This section is for the live video feed.")


if __name__ == "__main__":

Hope this helps!

Kind Regards,
Sahir Maharaj
Data Scientist | AI Engineer

P.S. Lets connect on LinkedIn!

➀ Want me to build your solution? Lets chat about how I can assist!
➀ Join my Medium community of 30k readers! Sharing my knowledge about data science and AI
➀ Website: https://sahirmaharaj.com
➀ Email: sahir@sahirmaharaj.com
➀ 100+ FREE Power BI Themes: Download Now