Skip to content

Commit 0383e4e

Browse files
authored
Doc for SPACE_CREATOR_USER_ID (#1437)
1 parent 59d3159 commit 0383e4e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/hub/spaces-overview.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Each Spaces environment is limited to 16GB RAM, 2 CPU cores and 50GB of (not per
3737
| 2x Nvidia A10G - large| 48GB | 24 vCPU | 92 GB | 1000 GB | $5.70 |
3838
| 4x Nvidia A10G - large| 96GB | 48 vCPU | 184 GB | 2000 GB | $10.80 |
3939
| Nvidia A100 - large | 40GB | 12 vCPU | 142 GB | 1000 GB | $4.13 |
40-
40+
4141
| **Storage tier** | **Size** | **Persistent** | **Monthly price** |
4242
|--------------------- |---------------------- |------------------ | --------------------- |
4343
| Ephemeral (default) | 50GB | No | Free! |
@@ -94,7 +94,7 @@ If you want to duplicate a Space, you can click the three dots at the top right
9494

9595
* Owner: The duplicated Space can be under your account or any organization in which you have write access
9696
* Space name
97-
* Visibility: The Space is private by default. Read more about private repositories [here](./repositories-settings#private-repositories).
97+
* Visibility: The Space is private by default. Read more about private repositories [here](./repositories-settings#private-repositories).
9898
* Hardware: You can choose the hardware on which the Space will be running. Read more about hardware upgrades [here](./spaces-gpus).
9999
* Storage: If the original repo uses persistent storage, you will be prompted to choose a storage tier. Read more about persistent storage [here](./spaces-storage).
100100
* Secrets and variables: If the original repo has set some secrets and variables, you'll be able to set them while duplicating the repo.
@@ -115,12 +115,13 @@ Paused time is not billed.
115115
In some cases, you might be interested in having programmatic access to the Space author or repository name. This feature is particularly useful when you expect users to duplicate your Space. To help with this, Spaces exposes different environment variables at runtime. Given a Space [`osanseviero/i-like-flan`](https://huggingface.co/spaces/osanseviero/i-like-flan):
116116

117117
* `CPU_CORES`: 4
118-
* `MEMORY`: 15Gi
118+
* `MEMORY`: 15Gi
119119
* `SPACE_AUTHOR_NAME`: osanseviero
120120
* `SPACE_REPO_NAME`: i-like-flan
121121
* `SPACE_TITLE`: I Like Flan (specified in the README file)
122122
* `SPACE_ID`: `osanseviero/i-like-flan`
123123
* `SPACE_HOST`: `osanseviero-i-like-flan.hf.space`
124+
* `SPACE_CREATOR_USER_ID`: `6032802e1f993496bc14d9e3` - This is the ID of the user that originally created the Space. It's useful if the Space is under an organization. You can get the user information with an API call to `https://huggingface.co/api/users/{SPACE_CREATOR_USER_ID}/overview`.
124125

125126
In case [OAuth](./spaces-oauth) is enabled for your Space, the following variables will also be available:
126127

@@ -131,14 +132,14 @@ In case [OAuth](./spaces-oauth) is enabled for your Space, the following variabl
131132

132133
## Clone the Repository
133134

134-
You can easily clone your Space repo locally. Start by clicking on the dropdown menu in the top right of your Space page:
135+
You can easily clone your Space repo locally. Start by clicking on the dropdown menu in the top right of your Space page:
135136

136137
<div class="flex justify-center">
137138
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/SpacesCloneRepo2.png"/>
138139
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/SpacesCloneRepo1.png"/>
139140
</div>
140141

141-
Select "Clone repository", and then you'll be able to follow the instructions to clone the Space repo to your local machine using HTTPS or SSH.
142+
Select "Clone repository", and then you'll be able to follow the instructions to clone the Space repo to your local machine using HTTPS or SSH.
142143

143144
<div class="flex justify-center">
144145
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/HttpsClone2.png"/>
@@ -152,7 +153,7 @@ Select "Clone repository", and then you'll be able to follow the instructions to
152153

153154
## Linking Models and Datasets on the Hub
154155

155-
You can showcase all the models and datasets that your Space links to by adding their identifier in your Space's README metadata. To do so, you can define them under the `models` and `datasets` keys. In addition to listing the artefacts in the README file, you can also record them in any `.py`, `.ini` or `.html` file as well. We'll parse it auto-magically!
156+
You can showcase all the models and datasets that your Space links to by adding their identifier in your Space's README metadata. To do so, you can define them under the `models` and `datasets` keys. In addition to listing the artefacts in the README file, you can also record them in any `.py`, `.ini` or `.html` file as well. We'll parse it auto-magically!
156157

157158
Here's an example linking two models from a space:
158159

0 commit comments

Comments
 (0)