File size: 393 Bytes
0926fea |
1 2 3 4 5 6 7 8 9 10 11 12 |
from pprint import pprint
from huggingface_hub import ModelFilter, HfApi
api = HfApi()
filt = ModelFilter(author='cardiffnlp')
models = api.list_models(filter=filt)
models_filtered = [i.modelId for i in models if 'mt5' in i.modelId]
pprint(sorted(models_filtered))
input("private all? >>>")
for i in models_filtered:
api.update_repo_visibility(repo_id=i, repo_type='model', private=True)
|