ShynBui commited on
Commit
ea6d602
1 Parent(s): 20127c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,7 +90,7 @@ def train_step(file=None, start_idx=0):
90
  try:
91
  success, message = train_batch(dataloader)
92
  if not success:
93
- return start_idx, "./checkpoint/model.pt # Trả về start_idx nếu lỗi xảy ra
94
 
95
  except HTMLError as e:
96
  print(e)
@@ -105,7 +105,7 @@ def train_step(file=None, start_idx=0):
105
  if not os.path.exists('./checkpoint'):
106
  os.makedirs('./checkpoint')
107
  torch.save(model.state_dict(), "./checkpoint/model.pt")
108
- return start_idx, "./checkpoint/model.pt
109
 
110
 
111
  if __name__ == "__main__":
 
90
  try:
91
  success, message = train_batch(dataloader)
92
  if not success:
93
+ return start_idx, "./checkpoint/model.pt" # Trả về start_idx nếu lỗi xảy ra
94
 
95
  except HTMLError as e:
96
  print(e)
 
105
  if not os.path.exists('./checkpoint'):
106
  os.makedirs('./checkpoint')
107
  torch.save(model.state_dict(), "./checkpoint/model.pt")
108
+ return start_idx, "./checkpoint/model.pt"
109
 
110
 
111
  if __name__ == "__main__":