Update train.py
This commit is contained in:
		
							parent
							
								
									fef22a3cf6
								
							
						
					
					
						commit
						db1f306145
					
				| 
						 | 
					@ -104,7 +104,7 @@ def get_latest_model(trained_model_folder: str, default_model: str = "train5/wei
 | 
				
			||||||
    # Lấy danh sách các thư mục theo ngày, loại bỏ thư mục của ngày hôm nay
 | 
					    # Lấy danh sách các thư mục theo ngày, loại bỏ thư mục của ngày hôm nay
 | 
				
			||||||
    subfolders = [
 | 
					    subfolders = [
 | 
				
			||||||
        f for f in os.listdir(trained_model_folder) 
 | 
					        f for f in os.listdir(trained_model_folder) 
 | 
				
			||||||
        if os.path.isdir(os.path.join(trained_model_folder, f)) and (f == today_str or f.startswith(today_str))
 | 
					        if os.path.isdir(os.path.join(trained_model_folder, f)) and (f <= today_str or f.startswith(today_str))
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
    subfolders = sorted(subfolders, reverse=True)  # Sắp xếp giảm dần (mới nhất trước)
 | 
					    subfolders = sorted(subfolders, reverse=True)  # Sắp xếp giảm dần (mới nhất trước)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue