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
30.69k stars 2.28k forks source link

Editable Docs #8403

Closed aliabd closed 1 month ago

aliabd commented 1 month ago

Converts the docs to a template format.

The build is failing because the current version bucket (4.31.5) on aws doesn't have the right jsons / templates. I can't manually change the format there because it will break the website. But i tested everything with a fake version.

If you want to test version vs main with the fake version just change /gradio/package.json to have "version": "TEST.VERSION" instead of 4.31.5 and run pnpm dev

When we want to merge this, we should do it and release a new version. Alternatively, I can edit the jsons on 4.31.5 and then merge and rebuild the website.

I will write a proper readme / contributing guide for how to make changes to the website and build locally

gradio-pr-bot commented 1 month ago

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website failed! Details
Storybook ready! Storybook preview
:unicorn: Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/68cb1718f0fb5cee76da743d466065201b0b3401/gradio-4.31.5-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@68cb1718f0fb5cee76da743d466065201b0b3401#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-builds.s3.amazonaws.com/68cb1718f0fb5cee76da743d466065201b0b3401/gradio-client-0.19.4.tgz
gradio-pr-bot commented 1 month ago

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio minor
website minor

With the following changelog entry.

Editable Docs

Maintainers or the PR author can modify the PR title to modify this entry.

#### Something isn't right? - Maintainers can change the version label to modify the version bump. - If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can [update the changelog file directly](https://github.com/gradio-app/gradio/edit/aliabd/docs-editable/.changeset/icy-mice-lose.md).
abidlabs commented 1 month ago

I'm running into an issue when testing this locally. I followed the instructions @aliabd you provided:

  1. I cloned the repo and modified gradio/package.json to have "version": "TEST.VERSION" instead of 4.31.5
  2. cd into js/_website
  3. run pnpm i
  4. run pnpm dev

I'm getting this error:

Error: Cannot find module '/Users/abidlabs/dev/gradio-repos/gradio/node_modules/.pnpm/vite@4.5.2_@types+node@20.3.2_less@4.2.0_lightningcss@1.21.7_sass@1.66.1_stylus@0.62.0_sugarss@4.0.1/node_modules/vite/bin/vite.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}