tools / spaces_per_model_repo.py
patrickvonplaten's picture
up
b3f3336
raw
history blame
217 Bytes
#!/usr/bin/env python3
from huggingface_hub import HfApi
import sys
api = HfApi()
model_id = str(sys.argv[1])
likes = sum(space.likes for space in HfApi().list_spaces(models=model_id))
print(f"{model_id}\t{likes}")