Are files stored on disk permanent?

I have a Gradio app where a user uploads a file and the app provides a modified version of it. The file is saved to the disk and the user is provided a download link pointing to that path.

I was wondering how long would the file last on the disk in an HF space. Are the files on the disk auto-cleared after some time?

Hi @amitness ! Gradio itself does not delete any files but the storage on Spaces is ephemeral so any files would be deleted if the space restarts for any reason.

1 Like