This repository has been archived on 2024-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
huggingface-proxy/keepalive/lib/hf.py

15 lines
294 B
Python

from huggingface_hub import login as hf_login
from huggingface_hub import HfApi
def login(token: str):
return hf_login(token)
def list_spaces(author: str):
api = HfApi()
result = []
for space in api.list_spaces(author=author):
result.append(space)
return result