Spaces:
Runtime error
Runtime error
Matthias Kleiner
commited on
Commit
·
9652e54
1
Parent(s):
8e0f4c4
fixed small bug
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def func(file, number_of_pages, secret):
|
|
19 |
space_runtime = hf_api.get_space_runtime("ByMatthew/deckify_private", token=read_key)
|
20 |
print(f"Space runtime: {space_runtime}")
|
21 |
|
22 |
-
if not space_runtime
|
23 |
|
24 |
space_runtime_after_restart = hf_api.restart_space("ByMatthew/deckify_private", token=read_key)
|
25 |
print(f"Space runtime after restart: {space_runtime_after_restart}")
|
|
|
19 |
space_runtime = hf_api.get_space_runtime("ByMatthew/deckify_private", token=read_key)
|
20 |
print(f"Space runtime: {space_runtime}")
|
21 |
|
22 |
+
if not space_runtime.stage == "RUNNING": # might need to check lowercase or something
|
23 |
|
24 |
space_runtime_after_restart = hf_api.restart_space("ByMatthew/deckify_private", token=read_key)
|
25 |
print(f"Space runtime after restart: {space_runtime_after_restart}")
|