Spaces:
Sleeping
Sleeping
Commit
·
9c4359c
1
Parent(s):
e62cbdf
Filter out private spaces
Browse files- processing.py +3 -0
processing.py
CHANGED
@@ -37,6 +37,9 @@ def get_info(space_name: SpaceInfo) -> SpaceData | None:
|
|
37 |
print(f"no space_name for {space_name}")
|
38 |
return None
|
39 |
space_info = api.space_info(space_name.id, token=os.getenv("HF_TOKEN"))
|
|
|
|
|
|
|
40 |
subdomain: str | None = getattr(space_info, "subdomain", None)
|
41 |
if subdomain is None:
|
42 |
print(f"no subdomain for {space_info.id}")
|
|
|
37 |
print(f"no space_name for {space_name}")
|
38 |
return None
|
39 |
space_info = api.space_info(space_name.id, token=os.getenv("HF_TOKEN"))
|
40 |
+
if space_info.private:
|
41 |
+
print(f"{space_name} is private")
|
42 |
+
return None
|
43 |
subdomain: str | None = getattr(space_info, "subdomain", None)
|
44 |
if subdomain is None:
|
45 |
print(f"no subdomain for {space_info.id}")
|