Update build_logic.py
Browse files- build_logic.py +4 -2
build_logic.py
CHANGED
@@ -14,7 +14,7 @@ from huggingface_hub import (
|
|
14 |
hf_hub_download,
|
15 |
delete_file as hf_delete_file,
|
16 |
HfApi,
|
17 |
-
list_repos as hf_list_repos,
|
18 |
create_pull_request as hf_create_pull_request,
|
19 |
add_space_comment as hf_add_space_comment, # Public API for adding comments to Space discussions
|
20 |
like as hf_like # Public API for liking repos
|
@@ -935,7 +935,9 @@ def list_user_spaces(hf_api_key, owner=None):
|
|
935 |
return None, f"Error auto-detecting owner for listing: {e}. Please specify Owner field."
|
936 |
|
937 |
api = HfApi(token=token)
|
938 |
-
spaces = api.
|
|
|
|
|
939 |
space_ids = [f"{r.author}/{r.id}" for r in spaces]
|
940 |
|
941 |
logger.info(f"Successfully listed {len(space_ids)} spaces for {effective_owner}.")
|
|
|
14 |
hf_hub_download,
|
15 |
delete_file as hf_delete_file,
|
16 |
HfApi,
|
17 |
+
#list_repos as hf_list_repos,
|
18 |
create_pull_request as hf_create_pull_request,
|
19 |
add_space_comment as hf_add_space_comment, # Public API for adding comments to Space discussions
|
20 |
like as hf_like # Public API for liking repos
|
|
|
935 |
return None, f"Error auto-detecting owner for listing: {e}. Please specify Owner field."
|
936 |
|
937 |
api = HfApi(token=token)
|
938 |
+
spaces = api.list_spaces(author=effective_owner)
|
939 |
+
#datasets = api.list_datasets(author=effective_owner)
|
940 |
+
#models = api.list_models(author=effective_owner)
|
941 |
space_ids = [f"{r.author}/{r.id}" for r in spaces]
|
942 |
|
943 |
logger.info(f"Successfully listed {len(space_ids)} spaces for {effective_owner}.")
|