Freddy Boulton 6a4bf7abe2
Delete user state when they close the tab. Add an unload event for the demo and a delete_callback on gr.State to let developers control how resources are cleaned up (#7829)
* Delete state

* add changeset

* Delete state

* WIP

* Add load event

* Working ttl

* unload e2e test

* Clean up

* add changeset

* Fix notebook

* add changeset

* Connect to heartbeat in python client

* 15 second heartbeat

* Demo for unload

* Add notebook

* add changeset

* Fix docs

* revert demo changes

* Add docstrings

* lint 🙄

* Edit

* handle shutdown issue

* state comments

* client test

* Fix:

* Fix e2e test

* 3.11 incompatibility

* delete after one hour

* lint + highlight

* Update .changeset/better-tires-shave.md

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update .changeset/better-tires-shave.md

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-04-01 18:31:56 -04:00
..
2023-10-31 04:46:02 +00:00
2023-12-20 21:16:21 -05:00
2023-10-31 10:11:17 -04:00
2023-10-31 10:11:17 -04:00
2023-11-18 23:42:11 +00:00
2023-11-13 15:14:55 -08:00
2023-10-31 02:41:19 -07:00
2023-10-19 10:56:10 -07:00
2023-10-31 10:11:17 -04:00
2024-02-21 17:27:58 -06:00
2023-10-19 10:56:10 -07:00
2023-10-19 10:56:10 -07:00