gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
31.82k stars 2.37k forks source link

Unable to Build Website Locally and Outdated Contributing Guide #8782

Closed lappemic closed 1 month ago

lappemic commented 1 month ago

Describe the bug

I wanted to fix a typo in the slider component (see #8736), but I encountered issues when trying to build the website locally. Here's a summary of the problems:

  1. Build Issues:

    • I attempted to use the pnpm build:cdn-local command as per the instructions (here), but it resulted in an error. It seems the correct command is just pnpm build.
  2. Outdated Contributing Guide:

    • The CONTRIBUTING.md file contains outdated information. Specifically, it mentions the following line:
      <script type="module" src="https://gradio.s3-us-west-2.amazonaws.com/{version}/gradio.js"></script>

      This script tag is not apparent anymore and cannot be served with:

      <script type="module" src="http://localhost:4321/gradio.js"></script>
    • The contributing guide should be updated to reflect the current build process and serve the correct local script.

Can you please confirm these issues or do i missunderstand the instructions?

Let me know if i could help resolve these issues!

Have you searched existing issues? 🔎

Reproduction

Try to build and serve website as stated (here)

Screenshot

No response

Logs

No response

System Info

- mbp m2

Severity

I can work around it

pngwn commented 1 month ago

Yep. Those instructions are for something else (and out of date). So they are totally wrong.

You can just pnpm dev from the js/_website directory to view and edit the site.

lappemic commented 1 month ago

Ok thanks. Is there a need to adjust the instructions?

I would put myself forward if you would give some clarifications on what this part is used for then.

abidlabs commented 1 month ago

Thanks @lappemic yes feel free to open a PR! cc @aliabd

lappemic commented 1 month ago

Since @aliabd self-assigned, i am not going to work on fixing this.

Let me know if i can assist somehow anyway.

aliabd commented 1 month ago

Sorry @lappemic I figured I'd do it since I also wanted to add a section explaining how the docs and guides are generated and how to contribute. Please take a look at the PR and let me know if you have any suggestions! https://github.com/gradio-app/gradio/pull/8842