Spaces:
Runtime error
Runtime error
import fnmatch | |
from functools import partial | |
import click | |
from gchar.generic import import_generic | |
from gchar.utils import GLOBAL_CONTEXT_SETTINGS | |
from gchar.utils import print_version as _origin_print_version | |
from cyberharem.utils import get_hf_client | |
print_version = partial(_origin_print_version, 'cyberharem.train') | |
import_generic() | |
def cli(): | |
pass # pragma: no cover | |
def models(pattern): | |
hf_client = get_hf_client() | |
for model in hf_client.list_models(author='CyberHarem'): | |
if fnmatch.fnmatch(model.modelId, pattern): | |
print(model.modelId) | |
def datasets(pattern): | |
hf_client = get_hf_client() | |
for ds in hf_client.list_datasets(author='CyberHarem'): | |
if fnmatch.fnmatch(ds.id, pattern): | |
print(ds.id) | |
if __name__ == '__main__': | |
cli() | |