tweet_topic_multilingual / hf_remove_models.py
asahi417's picture
init
0926fea
raw
history blame
380 Bytes
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')