Skip to content

New front for gradio chapters#34

Merged
dawoodkhan82 merged 11 commits into
mainfrom
gradio_newfront
May 12, 2022
Merged

New front for gradio chapters#34
dawoodkhan82 merged 11 commits into
mainfrom
gradio_newfront

Conversation

@mishig25

@mishig25 mishig25 commented Mar 23, 2022

Copy link
Copy Markdown
Contributor

Use this branch gradio_newfront as your base branch when you are making changes to chapter 9 until we deploy chapter 9

You can test your changes locally with:

pip install git+https://github.com/huggingface/doc-builder

doc-builder preview course ~/Desktop/course/chapters/en --not_python_module

Note: make sure to change ~/Desktop/course/chapters/en based on your filesystem

The command above should open http://localhost:3000/ automaatically. You'll see 404 on http://localhost:3000/, ignore it and just click whatever section you are editing on the left navbar.

Also, hot reloading is enabled by default, you should be able to see your changes live

Screenshot 2022-03-23 at 16 29 24

TODO

  • Add sections on Gradio blocks
  • Check if any old sections need updating for Gradio V3
  • Generate notebooks for Colab
  • Add note about Block Party event at start and end of chapter

@abidlabs

Copy link
Copy Markdown
Member

Awesome!! cc @dawoodkhan82

@dawoodkhan82

Copy link
Copy Markdown
Contributor

Tested, works great.

@lewtun

lewtun commented Apr 5, 2022

Copy link
Copy Markdown
Member

FYI I've integrated the changes on main so we can automatically build the docs in the CI - let's see if it works 🤞

@lewtun

lewtun commented Apr 5, 2022

Copy link
Copy Markdown
Member

OK the docs are failing to build due to a strange error (does not happen on main):

TypeError: Cannot read properties of undefined (reading 'length')
    at each (file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/chunks/index-2bd0fec1.js:83:29)
    at file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/chunks/Question-8d0b1575.js:58:24
    at Object.$$render (file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/chunks/index-2bd0fec1.js:112:18)
    at file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/entries/pages/chapter9/7.mdx.js:59:44
    at Object.$$render (file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/chunks/index-2bd0fec1.js:112:18)
    at Object.default (file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/index.js:57:92)
    at file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/entries/pages/__layout.svelte.js:15:68
    at Object.$$render (file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/chunks/index-2bd0fec1.js:112:18)
    at file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/index.js:51:97
    at $$render (file:///tmp/tmplofvkojh/kit/.svelte-kit/output/server/chunks/index-2bd0fec1.js:112:18)
> 500 /docs/course/pr_34/en/chapter9/7
    at file:///tmp/tmplofvkojh/kit/node_modules/@sveltejs/kit/dist/chunks/index5.js:427:11
    at save (file:///tmp/tmplofvkojh/kit/node_modules/@sveltejs/kit/dist/chunks/index5.js:659:4)
    at visit (file:///tmp/tmplofvkojh/kit/node_modules/@sveltejs/kit/dist/chunks/index5.js:[55](https://github.com/huggingface/course/runs/5833335009?check_suite_focus=true#step:10:55)2:3)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Installing node dependencies
Building HTML files. This will take a while :-)
Traceback (most recent call last):
  File "/usr/local/bin/doc-builder", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/doc_builder/commands/doc_builder_cli.py", line 43, in main
    args.func(args)
  File "/usr/local/lib/python3.8/site-packages/doc_builder/commands/build.py", line 143, in build_command
    subprocess.run(
  File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['npm', 'run', 'build']' returned non-zero exit status 1.

Maybe @mishig25 can help us understand what's causing this when he gets back from vacation 😎

Edit: nevermind, I figured out what the problem was and fixed it in 351c4f9

@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Apr 5, 2022

Copy link
Copy Markdown

The documentation is not available anymore as the PR was closed or merged.

@lewtun lewtun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me! Should we merge now or wait until we've updated the content with gradio v3?

Comment thread chapters/en/_toctree.yml

- local: chapter9
title: 9. Building and sharing demos
new: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI this field will eventually render a "New" icon on the frontend - see internal Slack thread: https://huggingface.slack.com/archives/C01SJL5C5LK/p1651736595622049

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mishig25 should I expect to see the "new" icon already in this PR or is this something that will become visible once I re-build the content on the release branch (for prod)?

Screen Shot 2022-05-10 at 11 53 40

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good

@mishig25

mishig25 commented May 9, 2022

Copy link
Copy Markdown
Contributor Author

@lewtun please let me know if there's anything I need to do for the new gradio chapters

@lewtun

lewtun commented May 10, 2022

Copy link
Copy Markdown
Member

@lewtun please let me know if there's anything I need to do for the new gradio chapters

Thank you so much for all your help @mishig25! I think that right now everything is looking good as far as the Gradio chapter is concerned :)

* blocks section

Co-authored-by: Abubakar Abid <[email protected]>

@lewtun lewtun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've done a final pass through the whole chapter and reading it again was a real pleasure - excellent job @dawoodkhan82 and @abidlabs 😍 !

I've added a bunch of nits to streamline the text and formatting with the other course chapters, but it's mostly minor stuff that should be easy to include :)

One last thing: @osanseviero suggested mentioning the Blocks event in chapter9/1 and chapter9/7. How about we include a small description of the event at the end of each of these sections?

Once we merge this, I'll then generate all the Colab notebooks so people can easily play with the demos :)

Comment thread chapters/en/chapter9/1.mdx Outdated
Comment thread chapters/en/chapter9/1.mdx Outdated
Comment thread chapters/en/chapter9/1.mdx Outdated
Comment thread chapters/en/chapter9/2.mdx Outdated
Comment thread chapters/en/chapter9/2.mdx Outdated
Comment thread chapters/en/chapter9/6.mdx Outdated
Comment thread chapters/en/chapter9/6.mdx Outdated
Comment thread chapters/en/chapter9/6.mdx Outdated
Comment thread chapters/en/chapter9/6.mdx Outdated
Comment thread chapters/en/chapter9/6.mdx Outdated
@abidlabs

Copy link
Copy Markdown
Member

LGTM, love the cute emojis sprinkled in the chapter 😄

@dawoodkhan82
dawoodkhan82 merged commit ea47067 into main May 12, 2022
@dawoodkhan82
dawoodkhan82 deleted the gradio_newfront branch May 12, 2022 01:16
GITbaburin pushed a commit to GITbaburin/course that referenced this pull request May 17, 2026
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.

5 participants