audio-difficulty / clean.py
PRamoneda
Initial commit for Hugging Face Space
c66e52a
raw
history blame contribute delete
527 Bytes
import os
def delete_clean_checkpoints(root_dir="models"):
deleted = 0
for dirpath, _, filenames in os.walk(root_dir):
for fname in filenames:
if fname.endswith("_clean.pth"):
file_path = os.path.join(dirpath, fname)
print(f"🗑️ Deleting: {file_path}")
os.remove(file_path)
deleted += 1
print(f"\n✅ Deleted {deleted} clean checkpoint(s) from '{root_dir}'")
if __name__ == "__main__":
delete_clean_checkpoints("models")