Mark as not-for-all-audiences
@lhoestq Thank you for this notification. This repository is now marked as not-for-all-audiences.
But for other repositories (over one thousands), it takes a quite long time to mark them.
Is there any API for listing repositories of one organization? I cannot find this in huggingface_hub
.
You can use
from huggingface_hub import list_datasets
datasets = list(list_datasets(author="CyberHarem"))
You can use
from huggingface_hub import list_datasets datasets = list(list_datasets(author="CyberHarem"))
Okay, thanks, this helps a lot.
However, due to the substantial amount of data yet to be processed, even with the use of scripts, it will take some time. We aim to complete the processing within a few weeks as quickly as possible.
Hi
@narugo
, here is a small script to add the tag programmatically - this way you can run it on all your datasets using a for
loop
from huggingface_hub import DatasetCard
from huggingface_hub.utils import EntryNotFoundError
def add_nfaa(dataset: str) -> None:
"""
Add the "not-for-all-audiences" tag to the dataset.
More info at
https://huggingface.co/content-guidelines
https://huggingface.co/blog/ethics-soc-3
"""
try:
dataset_card = DatasetCard.load(dataset, repo_type="dataset")
except EntryNotFoundError:
dataset_card = DatasetCard(content=f"# Dataset card for {dataset}")
tags = dataset_card.data.get("tags", [])
tags.append("not-for-all-audiences")
dataset_card.data["tags"] = tags
dataset_card.push_to_hub(dataset, repo_type="dataset")
if __name__ == "__main__":
add_nfaa("username/dataset_name")
Hey, @lhoestq
Sorry for the delay; I had a busy schedule earlier. I've now commenced batch processing of the dataset. I anticipate it will be completed at approximately 2023-09-17 16:00:00 Eastern Time. Please restore viewer access to the dataset at that point.
Additionally, I suggest optimizing the mechanism for 'not-for-all-audiences'. Currently, it's quite inconvenient as nearly every page switch necessitates a fresh click to access. Ideally, based on general logic, a user should only need to enter once to view the same dataset (or model) continuously. Alternatively, a permission validity period could be set for a specific duration (several hours or days), allowing uninterrupted access within that timeframe.
update: It's ready now.
Thanks ! I'll restore the viewer
Also thanks for the feedback regarding the current mechanism, I'll share this with the team
There is a setting you can turn on to not have to click the NFAA button every time at https://huggingface.co/settings/content-preferences
There is a setting you can turn on to not have to click the NFAA button every time at https://huggingface.co/settings/content-preferences
Wow, thanks for the new feature! It is much better now.