Skip to content

gradio comparison blog #2819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 17, 2025

Conversation

yvrjsharma
Copy link
Member

@yvrjsharma yvrjsharma commented Apr 16, 2025

Congratulations! You've made it this far! Once merged, the article will appear at https://huggingface.co/blog. Official articles
require additional reviews. Alternatively, you can write a community article following the process here.

Preparing the Article

You're not quite done yet, though. Please make sure to follow this process (as documented here):

  • Add an entry to _blog.yml.
  • Add a thumbnail. There are no requirements here, but there is a template if it's helpful.
  • Check you use a short title and blog path.
  • Upload any additional assets (such as images) to the Documentation Images repo. This is to reduce bloat in the GitHub base repo when cloning and pulling. Try to have small images to avoid a slow or expensive user experience.
  • Add metadata (such as authors) to your md file. You can also specify guest or org for the authors.
  • Ensure the publication date is correct.
  • Preview the content. A quick way is to paste the markdown content in https://huggingface.co/new-blog. Do not click publish, this is just a way to do an early check.

Here is an example of a complete PR: #2382

Getting a Review

Please make sure to get a review from someone on your team or a co-author.
Once this is done and once all the steps above are completed, you should be able to merge.
There is no need for additional reviews if you and your co-authors are happy and meet all of the above.

Feel free to add @pcuenca as a reviewer if you want a final check. Keep in mind he'll be biased toward light reviews
(e.g., check for proper metadata) rather than content reviews unless explicitly asked.

@yvrjsharma yvrjsharma requested a review from abidlabs April 16, 2025 18:39
_blog.yml Outdated
title: "17 Reasons Why Gradio Isn't Just Another UI Library"
author: ysharma
thumbnail: /blog/assets/why-gradio-stands-out/thumbnail.png
date: March 24, 2025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
date: March 24, 2025
date: April 16, 2025


In this article, we'll introduce features that are unique to Gradio and explain how they are essential for building powerful AI applications. We'll share links to Gradio's official documentation and release notes, so you can explore further if you're curious.

<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/why-gradio-stands-out/gradio-comparison-chart.png" alt="Comparison of Gradio with other frameworks" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image not found

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching this, should be fixed now.

Gradio's "API Recorder" was introduced in version 4.26. This powerful development tool enables developers to capture their UI interactions in real time and automatically generate corresponding API calls in Python or JavaScript.

- "API Recorder" can be found on the "View API" page discussed above.
- It helps in documenting API usage of gradio applications through your own real examples
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's stick to a single convention around capitalization. There are some other places in the blog post where "gradio" is used instead of "Gradio" as well

Suggested change
- It helps in documenting API usage of gradio applications through your own real examples
- It helps in documenting API usage of Gradio applications through your own real examples

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, fixed.


### **4. Automatic Queue Management for ML Tasks**

Gradio provides a sophisticated queuing system tailored for ML applications that handle both GPU-intensive computations and high-volume user access.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Gradio provides a sophisticated queuing system tailored for ML applications that handle both GPU-intensive computations and high-volume user access.
Gradio provides a sophisticated queuing system tailored for ML applications that handles both GPU-intensive computations and high-volume user access.


### **9. Gradio's Dynamic Interfaces**

The components and event listeners you define in gradio Blocks earlier were fixed—once the demo was launched, new components and listeners could not be added, and existing one could not be removed. But with `@gr.render` decorator, Gradio introduced the ability to change your UI dynamically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The components and event listeners you define in gradio Blocks earlier were fixed—once the demo was launched, new components and listeners could not be added, and existing one could not be removed. But with `@gr.render` decorator, Gradio introduced the ability to change your UI dynamically.
With the introduction of the `@gr.render()` decorator, the components and event listeners you define in your Gradio application are no longer fixed—you can add new components and listeners dynamically based on user interaction and state.

The components and event listeners you define in gradio Blocks earlier were fixed—once the demo was launched, new components and listeners could not be added, and existing one could not be removed. But with `@gr.render` decorator, Gradio introduced the ability to change your UI dynamically.

- You can now render UI modifications on-the-fly based on model outputs or your workflow.
- Any Gradio Blocks can be imported and rendered inside another Blocks using the .render() method
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a different use of .render() and unrelated

Suggested change
- Any Gradio Blocks can be imported and rendered inside another Blocks using the .render() method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still like to keep this point because it is, 1) less known, and 2) very useful.

Maybe I can format it differently. Let me know if the change looks good to you.


- You can generate an instant public URL by simply setting one parameter: `demo.launch(share=True)`. The application is accessible on a unique domain in the format `xxxxx.gradio.live` while keeping your code and model running in your local environment
- These share links have a 168-hour (1-week) timeout on Gradio's official share server
- You can generate an instant public URL by simply setting one parameter: `demo.launch(share=True)` . The application is accessible on `*.gradio.live` domain for 72 hours
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- You can generate an instant public URL by simply setting one parameter: `demo.launch(share=True)` . The application is accessible on `*.gradio.live` domain for 72 hours
- You can generate an instant public URL by simply setting one parameter: `demo.launch(share=True)` . The application is accessible on `*.gradio.live` domain for 1 week.

- These share links have a 168-hour (1-week) timeout on Gradio's official share server
- You can generate an instant public URL by simply setting one parameter: `demo.launch(share=True)` . The application is accessible on `*.gradio.live` domain for 72 hours
- The share link creates a secure TLS tunnel to your locally-running app through Gradio's share server using Fast Reverse Proxy (FRP)
- For enterprise deployments or situations requiring custom domains or additional security measures, you can host your own FRP server to avoid the 72-hour timeout
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- For enterprise deployments or situations requiring custom domains or additional security measures, you can host your own FRP server to avoid the 72-hour timeout
- For enterprise deployments or situations requiring custom domains or additional security measures, you can host your own FRP server to avoid the 1-week timeout

Copy link
Member

@abidlabs abidlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool great list @yvrjsharma, hopefully will lead to some nice seo and ai seo! Just a few minor comments but otherwise should be good to go

@abidlabs abidlabs requested a review from pcuenca April 16, 2025 20:32
@yvrjsharma
Copy link
Member Author

I've addressed the feedback, and the files are ready for another review @abidlabs

Copy link
Member

@abidlabs abidlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM nice work @yvrjsharma!

@abidlabs abidlabs merged commit fa1fee3 into huggingface:main Apr 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants