From d49f67886493d35150630a8b00e253524ad1eef2 Mon Sep 17 00:00:00 2001 From: Alexander C <48217309+alexandercarruthers@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:29:23 +0100 Subject: [PATCH] Fix invalid Python syntax for Spaces Overview page (#1303) `print(os.getenv['MODEL_REPO_ID'])` is invalid Python syntax this has been replaced with `print(os.getenv('MODEL_REPO_ID'))` --- docs/hub/spaces-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/spaces-overview.md b/docs/hub/spaces-overview.md index 17c133b23..c7f1578c5 100644 --- a/docs/hub/spaces-overview.md +++ b/docs/hub/spaces-overview.md @@ -81,7 +81,7 @@ Accessing secrets and variables is different depending on your Space SDK: For other Spaces, both are exposed to your app as environment variables. Here is a very simple example of accessing the previously declared `MODEL_REPO_ID` variable in Python (it would be the same for secrets): ```py import os -print(os.getenv['MODEL_REPO_ID']) +print(os.getenv('MODEL_REPO_ID')) ``` Spaces owners are warned when our `Spaces Secrets Scanner` [finds hard-coded secrets](./security-secrets).