Closed gauthamk28 closed 2 years ago
You cannot use Streamlit methods (st.*
) inside recv()
because recv()
is running in a different thread from the main one.
For your purpose, refer to the object detection demo for example.
In this example, the detection result is transferred from recv()
to the main script through the Processor instance's attribute and displayed with st.table()
.
recv()
: https://github.com/whitphx/streamlit-webrtc/blob/56d715a76247cd6303c9ddade5bc2a8e430ddc2f/app.py#L397
Hi @whitphx thank you for giving this amazing streamlit-webrtc . When I am running the app , I want to display the name of the person detected , when I use print(variable name) , the name of the person is getting printed , whereas when I use st.write(recv) inside recv .
Is there any way to display the result of object detection in html or is there anyway to connect this app with FastAPI , because I need to use this value to do more tasks outside python. I am new so please give any idea which will be helpful for me.