File size: 380 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 'cross-validation' in i.modelId]
pprint(sorted(models_filtered))
input("delete all? >>>")
for i in models_filtered:
api.delete_repo(repo_id=i, repo_type='model')
|