Skip to content

Improves "Getting Started" guide#1269

Merged
abidlabs merged 9 commits into
mainfrom
guides-fixes
May 16, 2022
Merged

Improves "Getting Started" guide#1269
abidlabs merged 9 commits into
mainfrom
guides-fixes

Conversation

@abidlabs
Copy link
Copy Markdown
Member

@abidlabs abidlabs commented May 16, 2022

  • Rewrote some of the content to make it more interesting
  • Reduced the content by about 50% and moved the remaining into an "Advanced Interface Features" Guide
  • Added a "Next Steps" section
  • Added sidebars to all of the guides

@abidlabs abidlabs requested a review from aliabid94 May 16, 2022 06:25
Copy link
Copy Markdown
Contributor

@omerXfaruq omerXfaruq left a comment

Choose a reason for hiding this comment

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

Good job!

Comment thread guides/getting_started.md Outdated
A web-based demo is great as it allows anyone who can use a browser (not just technical people) to intuitively try their own inputs and understand what you've built.

* `gradio.Interface`: a high-level API that allows you to create a machine learning demo simply by specifying a list of inputs and outputs. It often takes just a few lines of Python to create a fully usable and share machine learning demo.
However, creating such web-based demos has traditionally been difficult, as you needed to know backend frameworks (like Flask or Django) for serving the web app, containerization tools (like Docker) to package the model, databases to store data or users, and front end web development (HTML, CSS, JavaScript) to build a GUI for your demo.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, I kinda feel like this is a bit long, WDYT @aliabd and @aliabid94?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, feel the same way. Working on shortening it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could just say without any web development or hosting

Comment thread guides/getting_started.md
Notice how the state persists across submits within each page, but the state is not shared between the two pages. Some more points to note: you can pass in a default value to the state parameter, which is used as the initial value of the state. The state must be a something that can be serialized to a JSON format (e.g. a dictionary, a list, or a single value. Typically, objects will not work).

### Flagging
### Flagging 🚩
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can also shoot these sections to advanced_interface_features and shorten getting_started quite a bit. I think we should not try to show every feature on getting_started but let users take a quick start from here.

Flagging 🚩

Working with DataFrames and Graphs 📈

Working with Images 🎨

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm I wouldn't want users to miss these...

To make the quickstart easier to navigate, I'm adding a sidebar similar to the docs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If that is the case I suggest we move these sections to the end of the document. Most of the users will take a quick look, and skim through.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

agree with @farukozderim. Live doesn't need to be a section, it can be a single sentence.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@abidlabs pointing this comment in case you've not seen it:

If that is the case I suggest we move these sections to the end of the document. Most of the users will take a quick look, and skim through.

@omerXfaruq
Copy link
Copy Markdown
Contributor

#1274 @osanseviero provided some feedback on the Getting Started, worth looking through as well!

Comment thread guides/getting_started.md Outdated
### Loading Hugging Face Models and Spaces

Gradio integrates nicely with the Hugging Face Hub, allowing you to load models and Spaces with just one line of code. To use this, simply use the `load()` method in the `Interface` class. So:
We won't cover how Blocks works in this Quickstart, but if you are interested in more customization, [read our dedicated Guide to Blocks](introduction_to_blocks).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Delete "won't cover how Blocks works in this Quickstart, but"

@abidlabs
Copy link
Copy Markdown
Member Author

Incorporated various feedback from @aliabid94, @farukozderim, and @osanseviero. Thank you so much guys!

@abidlabs abidlabs merged commit ecda9d1 into main May 16, 2022
@abidlabs abidlabs deleted the guides-fixes branch May 16, 2022 15:35
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.

3 participants