Gradio message limit
Hello there! Suppose I have a chat UI created with gradio. Is there a way I can limit the users’ messages they can send to the model(3 per minute for example)?
2023-09-26T00:41:48Z
@abidlabsCan you help?
2023-09-26T04:51:22Z
Hi@nbaru, Gradio doesn’t do any sort of rate limiting, but you could get the IP address from the raw request (gr.Request object) and then apply some rate limiting in your function itself. See here:Gradio Request Docs
2023-09-26T10:56:54Z
@abidlabsThank you,one more question if you do not mind. What is the equivalent of‘st.session_state’ of streamlit in gradio?