| #-------------------------Restart the Hugging Face Space-------------------------------# | |
| # from huggingface_hub import login | |
| # login() | |
| print("Daily restart initiated...") | |
| from huggingface_hub import HfApi | |
| repo_id = "regulatorystudies/cra-window-rules" | |
| api = HfApi() | |
| #%% Restart | |
| api.restart_space(repo_id=repo_id, factory_reboot=True) | |
| print("Daily restart completed.") |