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
enhancement: Added support for new command 'gradio environment' #4915
enhancement: Added support for new command 'gradio environment' #4915
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-4915-all-demos You can install the changes in this PR by running: pip install https://gradio-builds.s3.amazonaws.com/a0b87cb6b3bc33f149b4c5fb8eeafa6fd9a7f811/gradio-3.37.0-py3-none-any.whl |
@@ -0,0 +1,23 @@ | |||
""" This file is the part of 'gradio/cli.py' for printing the environment info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This very cool @varshneydevansh ! Thank you
My comments are mainly around making the output look a bit nicer.
- The dependencies under
gradio
andgradio_client
should be indented. - I would add a new line between
Operating System
andgradio
line - I would add a new line between the last gradio dependency and the
gradio_client
section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think these changes are the ones you wanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is great thank you @varshneydevansh !
Hi @varshneydevansh thanks again for opening the PR! Did you get a chance to tweak this based on @freddyaboulton's comments? |
I thought Freddy will make the changes as I miss comprehend the "I would". |
It would be great if you could push the changes, and then we can make another pass, thanks @varshneydevansh! |
…thub.com/varshneydevansh/gradio into cli_command_to_get_environment_info_4598
@varshneydevansh is attempting to deploy a commit to the Hugging Face Team on Vercel. A member of the Team first needs to authorize it. |
Will merge once ci passes @varshneydevansh ! Thanks again for the nice contribution. |
I learned Python back in 2017, and I am so happy that finally I made some contribution. |
Description
gradio/cli.py
which routes various CLI commands to appropriate python functions.For example, if someone types
"gradio deploy"
, it callsgradio.deploy_space.deploy().
Similarly, for getting the environment info I added the new file as in future the CLI commands might increase in file named –
cli_env_info.py
in gradio folder.I have also added the check for in case if user might enter some wrong command.
Closes:
🎯 PRs Should Target Issues
It's a request feature to be able to get the details to make it easier for people to file bug reports if we shipped an easy command to list the OS, gradio version, and versions of gradio/gradio-client dependencies.
Tests & Changelog
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh
Unless the pull request is labeled with the "no-changelog-update" label by a maintainer of the repo, all pull requests must update the changelog located in
CHANGELOG.md
:Please add a brief summary of the change to the Upcoming Release section of the
CHANGELOG.md
file and includea link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by
[@myusername](link-to-your-github-profile)
in[PR 11111](https://github.com/gradio-app/gradio/pull/11111)
".