Update app.py
Browse files
app.py
CHANGED
@@ -31,10 +31,10 @@ headers = {
|
|
31 |
def restart_hf_space():
|
32 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
33 |
api = HfApi(token=HF_TOKEN)
|
34 |
-
api.restart_space('paola1/
|
35 |
|
36 |
# Schedule the task to run every hour
|
37 |
-
schedule.every(
|
38 |
|
39 |
def run_schedule():
|
40 |
while True:
|
|
|
31 |
def restart_hf_space():
|
32 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
33 |
api = HfApi(token=HF_TOKEN)
|
34 |
+
api.restart_space('paola1/proxy', factory_reboot=False)
|
35 |
|
36 |
# Schedule the task to run every hour
|
37 |
+
schedule.every(6).hours.do(restart_hf_space)
|
38 |
|
39 |
def run_schedule():
|
40 |
while True:
|