ShynBui commited on
Commit
16908cf
·
verified ·
1 Parent(s): eb9db2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -91,7 +91,8 @@ def train_step(file=None, start_idx=0):
91
  print("Exceeded GPU quota.")
92
  if not os.path.exists('./checkpoint'):
93
  os.makedirs('./checkpoint')
94
- torch.save(model.state_dict(), "./checkpoint/model.pt")
 
95
  return start_idx # Trả về start_idx để lưu lại vị trí
96
 
97
  start_idx = end_idx
 
91
  print("Exceeded GPU quota.")
92
  if not os.path.exists('./checkpoint'):
93
  os.makedirs('./checkpoint')
94
+ print('Save checkpoint')
95
+ torch.save(model.state_dict(), "./checkpoint/model.pt")
96
  return start_idx # Trả về start_idx để lưu lại vị trí
97
 
98
  start_idx = end_idx