Skip to content

Commit e226a34

Browse files
feat(docs): Add documentation for EU-specific gated models (#1874)
* feat(docs): add EU-specific gated models section * feat(docs): add EU-specific gated datasets section
1 parent e33add6 commit e226a34

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/hub/datasets-gated.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,21 @@ Alternatively, you can programmatically login using `login()` in a notebook or a
171171
You can also provide the `token` parameter to most loading methods in the libraries (`from_pretrained`, `hf_hub_download`, `load_dataset`, etc.), directly from your scripts.
172172

173173
For more details about how to login, check out the [login guide](/docs/huggingface_hub/quick-start#login).
174+
175+
### Restricting Access for EU Users
176+
177+
For gated datasets, you can add an additional layer of access control to specifically restrict users from European Union countries. This is useful if your dataset's license or terms of use prohibit its distribution in the EU.
178+
179+
To enable this, add the `extra_gated_eu_disallowed: true` property to your dataset card's metadata.
180+
181+
**Important:** This feature will only activate if your dataset is already gated. If `gated: false` or the property is not set, this restriction will not apply.
182+
183+
```yaml
184+
---
185+
license: mit
186+
gated: true
187+
extra_gated_eu_disallowed: true
188+
---
189+
```
190+
191+
The system identifies a user's location based on their IP address.

docs/hub/models-gated.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,21 @@ Alternatively, you can programmatically login using `login()` in a notebook or a
185185
You can also provide the `token` parameter to most loading methods in the libraries (`from_pretrained`, `hf_hub_download`, `load_dataset`, etc.), directly from your scripts.
186186

187187
For more details about how to login, check out the [login guide](https://huggingface.co/docs/huggingface_hub/quick-start#login).
188+
189+
### Restricting Access for EU Users
190+
191+
For gated models, you can add an additional layer of access control to specifically restrict users from European Union countries. This is useful if your model's license or terms of use prohibit its distribution in the EU.
192+
193+
To enable this, add the `extra_gated_eu_disallowed: true` property to your model card's metadata.
194+
195+
**Important:** This feature will only activate if your model is already gated. If `gated: false` or the property is not set, this restriction will not apply.
196+
197+
```yaml
198+
---
199+
license: mit
200+
gated: true
201+
extra_gated_eu_disallowed: true
202+
---
203+
```
204+
205+
The system identifies a user's location based on their IP address.

0 commit comments

Comments
 (0)