Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ app = FastAPI()
|
|
11 |
@app.get("/")
|
12 |
def start_train():
|
13 |
space_variables = API.get_space_variables(repo_id=REPO_ID)
|
14 |
-
if 'STATUS' in space_variables
|
15 |
print("Beginning processing.")
|
16 |
API.add_space_variable(repo_id=REPO_ID, key='STATUS', value='COMPUTING')
|
17 |
os.system(f"./entrypoint.sh {REPO_ID}")
|
|
|
11 |
@app.get("/")
|
12 |
def start_train():
|
13 |
space_variables = API.get_space_variables(repo_id=REPO_ID)
|
14 |
+
if 'STATUS' not in space_variables or space_variables['STATUS'] != 'COMPUTING':
|
15 |
print("Beginning processing.")
|
16 |
API.add_space_variable(repo_id=REPO_ID, key='STATUS', value='COMPUTING')
|
17 |
os.system(f"./entrypoint.sh {REPO_ID}")
|