File size: 669 Bytes
efb026f
 
 
 
d7977c0
8fa6dba
f88c143
0280861
 
f88c143
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from huggingface_hub import HfApi, ModelFilter
from pprint import pprint

api = HfApi()
models = api.list_models(filter=ModelFilter(author='tweettemposhift'))
models_filtered = [i.modelId for i in models if 'hate_balance' in i.modelId]
pprint(sorted(models_filtered))
for i in models_filtered:
    api.delete_repo(i, repo_type="model")
# models = api.list_models(filter=ModelFilter(author='tweettemposhift'))
# models_filtered = [i.modelId for i in models if 'topic-' in i.modelId]
# pprint(sorted([i for i in models_filtered if i.endswith('twitter-roberta-base-2019-90m')]))
# pprint(sorted([i for i in models_filtered if i.endswith('twitter-roberta-base-dec2020')]))