Skip to content

Commit 5d7ecae

Browse files
committed
feat(docs): add EU-specific gated datasets section
1 parent deecde2 commit 5d7ecae

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-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.

0 commit comments

Comments
 (0)