Skip to content
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

Remove Redundant Environment Variable Usage #3654

Merged
merged 3 commits into from
May 11, 2024
Merged

Conversation

cocktailpeanut
Copy link
Contributor

What does this PR do?

Fixes #3653

With Gradio,

  • the GRADIO_SERVER_PORT is by default 7860
  • the GRADIO_SHARE is by default None (0)

So we don't really need these environment variables. Additionally, the GRADIO_SERVER_PORT is causing issues when I already have another gradio app running on my machine since they use 7860 by default. (Gradio documentation about these variables here: https://www.gradio.app/docs/gradio/interface#interface-launch-arguments)

By removing these manual presets and let Gradio handle the default values, the app works exactly the same but allows for more flexibility (automatically using next available port, such as 7861, when 7860 is already occupied by another app)

Before submitting

@hiyouga hiyouga self-requested a review May 11, 2024 16:43
@hiyouga
Copy link
Owner

hiyouga commented May 11, 2024

LGTM! Thanks for your contrib

@hiyouga hiyouga merged commit d06d566 into hiyouga:main May 11, 2024
1 check passed
@hiyouga hiyouga added the solved This problem has been already solved label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use ports other than 7860
2 participants