meg HF Staff commited on
Commit
421828f
·
verified ·
1 Parent(s): 99e6095

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,7 +20,7 @@ def start_train():
20
  os.system(f"echo 'Requested hardware is {hardware}'")
21
  curr_runtime = API.get_space_runtime(repo_id=REPO_ID)
22
  os.system(f"echo 'Current hardware is {curr_runtime}'")
23
- if curr_runtime['hardware'] != hardware:
24
  os.system("echo 'Trying to switch.'")
25
  API.request_space_hardware(repo_id=REPO_ID, hardware=hardware)
26
  for model in model_file:
 
20
  os.system(f"echo 'Requested hardware is {hardware}'")
21
  curr_runtime = API.get_space_runtime(repo_id=REPO_ID)
22
  os.system(f"echo 'Current hardware is {curr_runtime}'")
23
+ if curr_runtime.hardware != hardware:
24
  os.system("echo 'Trying to switch.'")
25
  API.request_space_hardware(repo_id=REPO_ID, hardware=hardware)
26
  for model in model_file: