Update update_scheduler.py
Browse files- update_scheduler.py +2 -2
update_scheduler.py
CHANGED
@@ -13,9 +13,9 @@ from huggingface_hub.utils import RepositoryNotFoundError
|
|
13 |
|
14 |
class SpaceRestarter:
|
15 |
def __init__(self, space_id: str):
|
16 |
-
self.api = HfApi(
|
17 |
if self.api.get_token_permission() != "write":
|
18 |
-
raise ValueError(f"The HF token must have write permission.
|
19 |
try:
|
20 |
self.api.space_info(repo_id=space_id)
|
21 |
except RepositoryNotFoundError:
|
|
|
13 |
|
14 |
class SpaceRestarter:
|
15 |
def __init__(self, space_id: str):
|
16 |
+
self.api = HfApi()
|
17 |
if self.api.get_token_permission() != "write":
|
18 |
+
raise ValueError(f"The HF token must have write permission.")
|
19 |
try:
|
20 |
self.api.space_info(repo_id=space_id)
|
21 |
except RepositoryNotFoundError:
|