diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-17 21:04:51 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-17 21:04:51 +0100 |
| commit | ac6f635c4d724cc3e1e90bb0a300d5eb476dcc86 (patch) | |
| tree | 439ef548e92122b637f5e002acbea1fa742bc57b /cli | |
| parent | 41eef4ede18d0e57ba8110d65a8f68e5252813af (diff) | |
api
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/app/settings/app_cfg.py | 6 | ||||
| -rw-r--r-- | cli/app/utils/cortex_utils.py | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cli/app/settings/app_cfg.py b/cli/app/settings/app_cfg.py index b5c383b..16f5b25 100644 --- a/cli/app/settings/app_cfg.py +++ b/cli/app/settings/app_cfg.py @@ -47,6 +47,12 @@ os.makedirs(DIR_RESULTS, exist_ok=True) os.makedirs(DIR_RENDERS, exist_ok=True) # ----------------------------------------------------------------------------- +# Cortex +# ----------------------------------------------------------------------------- + +API_REMOTE = os.environ('API_REMOTE') || 'https://lens.neural.garden' + +# ----------------------------------------------------------------------------- # Model config # ----------------------------------------------------------------------------- diff --git a/cli/app/utils/cortex_utils.py b/cli/app/utils/cortex_utils.py index ccebdc6..7974502 100644 --- a/cli/app/utils/cortex_utils.py +++ b/cli/app/utils/cortex_utils.py @@ -9,7 +9,7 @@ from app.settings import app_cfg def api_url(path): """Generate a base API path""" - return "https://mirror.neural.garden/api/{}/".format(path) + return "{}/api/{}/".format(app_cfg.API_REMOTE, path) def cortex_folder(opt_folder_id): return fetch_json(os.path.join(api_url('folder'), str(opt_folder_id) + "/")) |
