content.raw: Tips for saving disk space with Gradio 💾
content.type: text
content.value: Tips for saving disk space with Gradio 💾
content.type: new_line
content.type: new_line
content.raw: Try these out with gradio 4.22.0 ! Code snippet attached.
content.type: text
content.value: Try these out with gradio 4.22.0 ! Code snippet attached.
content.type: new_line
content.type: new_line
content.raw: 1. Set delete_cache. The delete_cache parameter will periodically delete files from gradio's cache that are older than a given age. Setting it will also delete all files created by that app when the app shuts down.  It is a tuple of two ints, (frequency, age) expressed in seconds. So delete_cache=(3600, 3600), will delete files older than an hour every hour.
content.type: text
content.value: 1. Set delete_cache. The delete_cache parameter will periodically delete files from gradio's cache that are older than a given age. Setting it will also delete all files created by that app when the app shuts down.  It is a tuple of two ints, (frequency, age) expressed in seconds. So delete_cache=(3600, 3600), will delete files older than an hour every hour.
content.type: new_line
content.type: new_line
content.raw: 2. Use static files. Static files are not copied to the cache and are instead served directly to users of your app. This is useful for components displaying a lot of content that won't change, like a gallery with hundreds of images.
content.type: text
content.value: 2. Use static files. Static files are not copied to the cache and are instead served directly to users of your app. This is useful for components displaying a lot of content that won't change, like a gallery with hundreds of images.
content.type: new_line
content.type: new_line
content.raw: 3. Set format="jpeg" for images and galleries. JPEGs take up less disk space than PNGs. This can also speed up the speed of your prediction function as they will be written to the cache faster.
content.type: text
content.value: 3. Set format="jpeg" for images and galleries. JPEGs take up less disk space than PNGs. This can also speed up the speed of your prediction function as they will be written to the cache faster.
content.type: new_line
content.type: new_line
rawContent: Tips for saving disk space with Gradio 💾
  
  Try these out with gradio 4.22.0 ! Code snippet attached.
  
  1. Set delete_cache. The delete_cache parameter will periodically delete files from gradio's cache that are older than a given age. Setting it will also delete all files created by that app when the app shuts down.  It is a tuple of two ints, (frequency, age) expressed in seconds. So delete_cache=(3600, 3600), will delete files older than an hour every hour.
  
  2. Use static files. Static files are not copied to the cache and are instead served directly to users of your app. This is useful for components displaying a lot of content that won't change, like a gallery with hundreds of images.
  
  3. Set format="jpeg" for images and galleries. JPEGs take up less disk space than PNGs. This can also speed up the speed of your prediction function as they will be written to the cache faster.
  
  
reactions.reaction: ❤️
reactions.users: clem samusenps abidlabs radames avinash02 MaziyarPanahi victor clefourrier boapps
commentators._id: 626a9bfa03e2e2796f24ca11
commentators.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1654278567459-626a9bfa03e2e2796f24ca11.jpeg
commentators.fullname: Freddy Boulton
commentators.name: freddyaboulton
commentators.type: user
commentators._id: 608b8bb39d7c9519b4adae19
commentators.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1621947938344-noauth.png
commentators.fullname: Abubakar Abid
commentators.name: abidlabs
commentators.type: user
commentators._id: 6064e095abd8d3692e3e2ed6
commentators.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1648966381588-6064e095abd8d3692e3e2ed6.jpeg
commentators.fullname: Radamés Ajna
commentators.name: radames
commentators.type: user