Freddy Boulton

freddyaboulton

AI & ML interests

None yet

Articles

Organizations

freddyaboulton's activity

replied to their post 22 days ago
view reply

Here is a demo of the API recorder ✨

posted an update 22 days ago
view post
Post
2268
We just released gradio version 4.26.0 ! We *highly* recommend you upgrade your apps to this version to bring in these nice changes:

🎥 Introducing the API recorder. Any gradio app running 4.26.0 and above will have an "API Recorder" that will record your interactions with the app and auto-generate the corresponding python or js code needed to recreate those actions programmatically. It's very neat!

📝 Enhanced markdown rendering in gr.Chatbot

🐢 Fix for slow load times on spaces as well as the UI locking up on rapid generations

See the full changelog of goodies here: https://www.gradio.app/changelog#4-26-0
  • 1 reply
·
posted an update 27 days ago
view post
Post
2068
Gradio 4.25.0 is out with some nice improvements and bug fixes!

🧹 Automatic deletion of gr.State variables stored in the server. Never run out of RAM again. Also adds an unload event you can run when a user closes their browser tab.

😴 Lazy example caching. You can set cache_examples="lazy" to cache examples when they're first requested as opposed to before the server launches. This can cut down the server's start-up time drastically.

🔊 Fixes a bug with streaming audio outputs

🤖 Improvements to gr.ChatInterface like pasting images directly from the clipboard.

See the rest of the changelog here: https://www.gradio.app/changelog#4-25-0
replied to their post about 1 month ago
view reply

Not with the format parameter. That only applies if you return a numpy or PIL image from your prediction function. If you want to control how files are saved to jpeg, you can do that within your prediction function and gradio will not modify it further.

posted an update about 1 month ago
view post
Post
1528
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.

·
posted an update 3 months ago
view post
Post
New in Gradio 4.16.0 - Galleries as Input 🖼️

Now your users can upload multiple images as input to your AI application and view them in a slick gallery!

Attached is a demo of how this new feature can be used in a photomaker-type application: TencentARC/PhotoMaker

Shout out @abidlabs and @akhaliq who proposed this feature after seeing some of the workarounds gradio developers were using in the wild to upload multiple images.

The gradio team works hard to stay up to date with the latest trends in AI! If there's something missing from the library, file an issue on github! https://github.com/gradio-app/gradio/issues
  • 2 replies
·
posted an update 3 months ago
view post
Post
Making gradio's auto-reload leaner and more robust 💪

Auto-reload is one of the coolest (and maybe underrated) features of gradio in my opinion. It automatically detects changes in your python app file and hot swaps your backend and frontend without restarting the server. I may be biased, but that's a way nicer experience than most other reload mode features out there.

This is all possible due to novel use of python's built in importlib module. Since this is a non-standard use of the module, our users have encountered some rough edges in the wild.

I'm happy to announce two improvements that will be out in the next release of gradio. They were both made possible by collaboration in the open source community.

1. First, gradio's reload mode now works with the python-dotenv library. Getting to the bottom of this one took a lot of sleuthing by our users and the fix got merged and released into the python-dotenv package last night! Thanks to @theskumar , maintainer of python-dotenv, for all the help.
2. Second, gradio's reload mode now consumes an order of magnitude less CPU. Depending on how many files are in your source directory, you may see between 2x to 10x less CPU utilization. Thanks to @velaia for filing the issue and @abidlabs for the review!

More improvements to reload mode are planned. Stay tuned!
replied to chansung's post 3 months ago