Comments (4)
Hi @mberco-quandl ! There already is such an event! It is the unload
event. It is triggered once a user closes their tab. See the docs here
However, gradio can already clean up files periodically for you with the delete_cache
parameter of Blocks
, Interface
, ChatInterface
's init method
Will close this in the meantime.
from gradio.
I love you guys for making life for frontend noobs a breeze.
from gradio.
@freddyaboulton Without inputs to the unload event listener how does one control which files to delete upon terminating the session?
from gradio.
@freddyaboulton for additional clarity I've tried referencing gr.File objects' path using the .value attribute without passing the gr.File in as an input, but it always returns a None. I've tried adding nonlocal flags, other solutions, nothing works as intended yet. Unsure how to a) access and b) pass the session-ID into the function triggered by .unload. Without b) I'm not sure how .unload can be used to manage storage.
from gradio.
Related Issues (20)
- Why can't my images be displayed in gr.Gallery() HOT 1
- Gradio for .NET developers HOT 1
- How to modify gr. State (global variable) while the global variable changes HOT 3
- gr.State JSON serializable, when there's a reload HOT 1
- Fooocus NOT WORKING on Google Colab's Gradio Link HOT 2
- ReadTimeout: The read operation timed out HOT 1
- Suddenly the chatbot stop working fromn colab HOT 2
- Allow installing `@gradio/client` via cdn HOT 1
- The background color displays differently on different computers HOT 4
- Connection errored out and new bug
- Dataframe not showing all items
- Drag-and-drop feature for ImageEditor
- Limit the amount of values shown in a Dropdown element. HOT 2
- Be able to create custom components by composing existing Gradio components in Python
- Additional parameters in ChatInterface have incorrect names HOT 1
- The broken JavaScript client HOT 4
- VideoEditor supports mask brush drawing?
- Limit oauth logins HOT 6
- submit_btn in multimodal not working as intended.
- Gradio showing Error: NO API Found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.