os.remove(os.path.join("../models/custom",model_id,'.gitattributes'))ifos.path.exists(os.path.join("../models/custom",model_id,'.gitattributes'))elseNone# remove the .gitattributes so files don't use LFS
subprocess.run(['rm','-rf',os.path.join("../models/custom",model_id,'.git')])ifos.path.exists(os.path.join("../models/custom",model_id,'.git'))elseNone# remove all the .git folders as we dont need them.
# get the folder size and delete it if its larger than 100mb
size=0
foreleinos.scandir(os.path.join("../models/custom",model_id)):# get folder size
size+=os.stat(ele).st_size
ifsize>100000000:# if the folder is larger than 100mb delete it.