Optional Content Warning for Datasets
COLLABORATOR
Hi! You can use the `extra_gated_prompt` YAML field in a dataset card for displaying custom messages/warnings that the user must accept before gaining access to the actual dataset. This option also keeps the viewer hidden until the user agrees to terms. 
2022-05-02T12:04:18Z
https://github.com/huggingface/datasets/issues/4163#issuecomment-1114770351
https://api.github.com/repos/huggingface/datasets/issues/4163
IC_kwDODunzps5Ccguv
https://api.github.com/repos/huggingface/datasets/issues/comments/1114770351/reactions
2022-05-02T12:04:18Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1114770351
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
NONE
Hi @mariosasko, thanks for explaining how to add this feature. 

If the current dataset yaml is:
```
---
annotations_creators:
- expert
language_creators:
- expert-generated
languages:
- en
license:
- cc-by-4.0
multilinguality:
- monolingual
pretty_name: HatemojiBuild
size_categories:
- 1K<n<10K
source_datasets:
- original
task_categories:
- text-classification
task_ids:
- hate-speech-detection
---
```

Can you provide a minimal working example of how to added the gated prompt?

Thanks!
2022-05-10T09:20:30Z
https://github.com/huggingface/datasets/issues/4163#issuecomment-1122142899
https://api.github.com/repos/huggingface/datasets/issues/4163
IC_kwDODunzps5C4oqz
https://api.github.com/repos/huggingface/datasets/issues/comments/1122142899/reactions
2022-05-10T09:20:30Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1122142899
https://avatars.githubusercontent.com/u/22522221?v=4
https://api.github.com/users/HannahKirk/events{/privacy}
https://api.github.com/users/HannahKirk/followers
https://api.github.com/users/HannahKirk/following{/other_user}
https://api.github.com/users/HannahKirk/gists{/gist_id}
https://github.com/HannahKirk
HannahKirk
MDQ6VXNlcjIyNTIyMjIx
https://api.github.com/users/HannahKirk/orgs
https://api.github.com/users/HannahKirk/received_events
https://api.github.com/users/HannahKirk/repos
https://api.github.com/users/HannahKirk/starred{/owner}{/repo}
https://api.github.com/users/HannahKirk/subscriptions
User
https://api.github.com/users/HannahKirk
public
CONTRIBUTOR
```
---
annotations_creators:
- expert
language_creators:
- expert-generated
languages:
- en
license:
- cc-by-4.0
multilinguality:
- monolingual
pretty_name: HatemojiBuild
size_categories:
- 1K<n<10K
source_datasets:
- original
task_categories:
- text-classification
task_ids:
- hate-speech-detection
extra_gated_prompt: "This repository contains harmful content."
---
```
\+ enable `User Access requests` under the Settings pane.

There's a brief guide here https://discuss.huggingface.co/t/how-to-customize-the-user-access-requests-message/13953 , and you can see the field in action here, https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/blob/main/README.md (you need to agree the terms in the Dataset Card pane to be able to access the files pane, so this comes up 403 at first).

And a working example here! https://huggingface.co/datasets/DDSC/dkhate :) Great to be able to mitigate harms in text.
2022-05-10T09:48:12Z
https://github.com/huggingface/datasets/issues/4163#issuecomment-1122170920
https://api.github.com/repos/huggingface/datasets/issues/4163
IC_kwDODunzps5C4vgo
https://api.github.com/repos/huggingface/datasets/issues/comments/1122170920/reactions
2022-05-10T09:49:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1122170920
https://avatars.githubusercontent.com/u/121934?v=4
https://api.github.com/users/leondz/events{/privacy}
https://api.github.com/users/leondz/followers
https://api.github.com/users/leondz/following{/other_user}
https://api.github.com/users/leondz/gists{/gist_id}
https://github.com/leondz
leondz
MDQ6VXNlcjEyMTkzNA==
https://api.github.com/users/leondz/orgs
https://api.github.com/users/leondz/received_events
https://api.github.com/users/leondz/repos
https://api.github.com/users/leondz/starred{/owner}{/repo}
https://api.github.com/users/leondz/subscriptions
User
https://api.github.com/users/leondz
public
CONTRIBUTOR
-- is there a way to gate content anonymously, i.e. without registering which users access it?
2022-05-10T09:55:54Z
https://github.com/huggingface/datasets/issues/4163#issuecomment-1122178496
https://api.github.com/repos/huggingface/datasets/issues/4163
IC_kwDODunzps5C4xXA
https://api.github.com/repos/huggingface/datasets/issues/comments/1122178496/reactions
2022-05-10T09:55:54Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1122178496
https://avatars.githubusercontent.com/u/121934?v=4
https://api.github.com/users/leondz/events{/privacy}
https://api.github.com/users/leondz/followers
https://api.github.com/users/leondz/following{/other_user}
https://api.github.com/users/leondz/gists{/gist_id}
https://github.com/leondz
leondz
MDQ6VXNlcjEyMTkzNA==
https://api.github.com/users/leondz/orgs
https://api.github.com/users/leondz/received_events
https://api.github.com/users/leondz/repos
https://api.github.com/users/leondz/starred{/owner}{/repo}
https://api.github.com/users/leondz/subscriptions
User
https://api.github.com/users/leondz
public
NONE
+1 to @leondz's question. One scenario is if you don't want the dataset to be indexed by search engines or viewed in browser b/c of upstream conditions on data, but don't want to collect emails. Some ability to turn off the dataset viewer or add a gating mechanism without emails would be fantastic.
2022-06-09T20:18:32Z
https://github.com/huggingface/datasets/issues/4163#issuecomment-1151577966
https://api.github.com/repos/huggingface/datasets/issues/4163
IC_kwDODunzps5Eo69u
https://api.github.com/repos/huggingface/datasets/issues/comments/1151577966/reactions
2022-06-09T20:39:02Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1151577966
https://avatars.githubusercontent.com/u/1609857?v=4
https://api.github.com/users/Breakend/events{/privacy}
https://api.github.com/users/Breakend/followers
https://api.github.com/users/Breakend/following{/other_user}
https://api.github.com/users/Breakend/gists{/gist_id}
https://github.com/Breakend
Breakend
MDQ6VXNlcjE2MDk4NTc=
https://api.github.com/users/Breakend/orgs
https://api.github.com/users/Breakend/received_events
https://api.github.com/users/Breakend/repos
https://api.github.com/users/Breakend/starred{/owner}{/repo}
https://api.github.com/users/Breakend/subscriptions
User
https://api.github.com/users/Breakend
public
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

We now have hate speech datasets on the hub, like this one: https://huggingface.co/datasets/HannahRoseKirk/HatemojiBuild

I'm wondering if there is an option to select a content warning message that appears before the dataset preview? Otherwise, people immediately see hate speech when clicking on this dataset.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

Implementation of a content warning message that separates users from the dataset preview until they click out of the warning.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

Possibly just a way to remove the dataset preview completely? I think I like the content warning option better, though.

**Additional context**
Add any other context about the feature request here.
