Skip to content

Commit

Permalink
Add defaults for env vars; fix UX oversight
Browse files Browse the repository at this point in the history
  • Loading branch information
Darwinkel committed Mar 16, 2024
1 parent 7ddb695 commit 069314b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion docker-compose.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ services:
security_opt:
- no-new-privileges:true
environment:
GRADIO_EXAMPLES_CACHE: "/tmp/"
GRADIO_ANALYTICS_ENABLED: False
GRADIO_SERVER_NAME: "0.0.0.0"
GRADIO_SERVER_PORT: 1337
Expand Down
5 changes: 3 additions & 2 deletions shepardtts/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ def main() -> None:

language_gr = gr.Dropdown(
label="Language",
info="Select the language to be used by the model.",
info="Select the language to be used by the model. "
"The prompt should be written in the language selected here.",
choices=language2id().keys(),
multiselect=False,
value="en",
value="English",
)

format_gr = gr.Radio(
Expand Down
12 changes: 6 additions & 6 deletions shepardtts/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

CHECKPOINT_DIR = "/xtts_model"
CHECKPOINTS_CONFIG_JSON = "/xtts_model/config.json"
CHECKPOINT_VOCAB_JSON = "/xtts_model/vocab.json"
MEAN_CHARACTER_EMBEDDINGS_PATH = "/mean_character_embeddings"
CHECKPOINT_DIR = os.environ.get("CHECKPOINT_DIR", "/xtts_model")
CHECKPOINTS_CONFIG_JSON = os.environ.get("CHECKPOINTS_CONFIG_JSON", "/xtts_model/config.json")
CHECKPOINT_VOCAB_JSON = os.environ.get("CHECKPOINT_VOCAB_JSON", "/xtts_model/vocab.json")
MEAN_CHARACTER_EMBEDDINGS_PATH = os.environ.get("MEAN_CHARACTER_EMBEDDINGS_PATH", "/mean_character_embeddings")

GRADIO_EXAMPLES_CACHE = os.environ["GRADIO_EXAMPLES_CACHE"]
SECRET_KEY = os.environ["SECRET_KEY"]
GRADIO_EXAMPLES_CACHE = os.environ.get("GRADIO_EXAMPLES_CACHE", "/tmp/") # noqa: S108
SECRET_KEY = os.environ.get("SECRET_KEY", "changeme")

0 comments on commit 069314b

Please sign in to comment.