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
Adding a Playground Tab to the Website #1860
Conversation
Very cool @aliabd! Some quick feedback:
|
Here are some more demos that would be nice to showcase:
Also I'd only keep 1 of the hello worlds so that people get to the more exciting demos quickly |
@abidlabs @aliabd What about calling this section the "Cookbook" or "Recipes". I've seen the concept of a cookbook used in other libraries (pyarrow, pytorch) and the goal is to provide a concise code snippet for solving a common task. That sounds exactly what we're going with here and I think having this on the website will make it really easy to add examples for stuff that's useful but too small for a guide. Curious on your thoughts. We may have to add some prose to add context to the code if we go down this route but it should be no more than a sentence per recipe. |
I really like "Recipes", definitely catchier than "Demos". Some more thoughts:
|
Would it be better if the demos would be in vertical column and scrollable, WDYT? Users would be able to see all of the demos at once. |
Agree that vertical scrolling would be nice with all demos loaded at and scrollable. |
I was thinking about the Recipes section some more, and I think we can think of it as a way to provide "templates" to users for common use cases. Common use cases could include things like:
I'm imagining a well-designed page with thumbnails of the demo, along with a description, and when you click on the thumbnail, you are presented with the code and live app. Something like one of these: |
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-1860-all-demos |
What about something like this? Screen.Recording.2022-08-24.at.4.35.14.PM.mov |
This looks very nice @aliabd and very clean! Some suggestions:
I think we should think through whether these specific demos are the "best ones" to use for people wanting "recipes" or "templates", and maybe rearranging the order of the some of the demos. So for example, "GPT-J" should appear before "GPT" because it's a simpler demo and should probably be called "GPT-J from Hugging Face Hug", and "GPT" should be renamed "GPT (Single Textbox)" to make it clear what the value of that demo is. Overall, looks great! |
Thanks for the feedback!
Tested everything (including restarting spaces) on devserver. |
I still can't figure out why tests are failing, is this related to a separate issue? |
It's probably the change in |
Oh wow.. was debugging something with @aliabid94 and had no idea I made that change in this branch. Thanks @freddyaboulton! |
Amazing, this is super nice! LGTM to merge |
|
I think "Recipes" is pretty synonymous to code templates, and I find it catchier than "Demos" (i.e. more people would be interested in checking it out if we announce it). But I'm fine with "Demos" too if you guys feel strongly against "Recipes."
I think 6 items is fine (we shouldn't add more than this). If needed, we could get rid of Guides as a separate section since all of the Guides show up in the sidebar when you click on Quickstart. (However, then there's no way to search within the Guides) Agree with @aliabid94 on all of the other points |
@aliabid94 I implemented all your changes:
Play around here. |
Love it! LGTM |
Adding a playground tab to the website, initially will just show curated demos side by side with their code.
Currently has 12 demos (all the demos in getting started and blocks guides) but it's very easy to add more. Still need to make some styling changes.
Screen.Recording.2022-07-22.at.3.59.55.PM.mov
Fixes #1638