meg HF Staff commited on
Commit
4402217
·
verified ·
1 Parent(s): a782adf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -17,7 +17,9 @@ def start_train():
17
  hardware = hardware.strip()
18
  print(f"Hardware is {hardware}")
19
  curr_runtime = API.get_space_runtime(repo_id=REPO_ID)
 
20
  if curr_runtime != hardware:
 
21
  API.request_space_hardware(repo_id=REPO_ID, hardware=hardware)
22
  for model in model_file:
23
  model = model.strip()
 
17
  hardware = hardware.strip()
18
  print(f"Hardware is {hardware}")
19
  curr_runtime = API.get_space_runtime(repo_id=REPO_ID)
20
+ print(f"Current hardware is {curr_runtime}")
21
  if curr_runtime != hardware:
22
+ print("Trying to switch.")
23
  API.request_space_hardware(repo_id=REPO_ID, hardware=hardware)
24
  for model in model_file:
25
  model = model.strip()