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

Environment variables #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

cocktailpeanut
Copy link

  • The 0.0.0.0 IP is not user friendly because when you launch the gradio app it says to visit http://0.0.0.0:7860 but it doesn't work on windows (You have to open http://127.0.0.1:7860 instead). I guess some people would want 0.0.0.0 option but this should not be forced, therefore added an environment variable named SERVER_NAME which you can use to override the default 0.0.0.0 (In my case i set SERVER_NAME=127.0.0.1 in order to get it to work on windows)
  • server_port being fixed to 7860 is not a good idea because there might be other gradio apps running on the user's machine (gradio uses 7860 by default and counts up), in which case this app will fail to start. By omitting the server_port, it will still launch at 7860, but if there already is an app running at port 7860, gradio will automatically increment and start the server at 7861
  • PHONEMIZER_ESPEAK_LIBRARY fix: I understand what you had to do to get espeak to work on Macs, but this breaks if you've installed espeak using some other package manager or installed it on a custom location (for example using a custom homebrew path). I made the change so if the PHONEMIZER_ESPEAK_LIBRARY variable is already set, it doesn't override the environment variable. (In my case the program won't work at all because no matter what environment variable i pass it, you would override it here by hardcoding)

Note that none of these are breaking changes. I just had to make these changes to make sure the app works for as many people as possible out of the box.

@darkacorn
Copy link
Contributor

small rec. instead of SERVER_NAME i would rename it to ZONOS_HOST a because its ip based (could have N eth devices ) and b .. it would eventually override and conflict with other env vars or generically add a --host flag

@cocktailpeanut
Copy link
Author

@darkacorn good point, updated.

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.

2 participants