Spaces:
Sleeping
Sleeping
Download clear_cache.py from MSherbinii/ipad-vad-training: direct link, hf CLI and curl.
- Browser
- Download file 428 Bytes
-
https://huggingface.co/spaces/MSherbinii/ipad-vad-training/resolve/main/clear_cache.py
- Command line
-
hf download hf://spaces/MSherbinii/ipad-vad-training/clear_cache.py
-
curl -L -o clear_cache.py https://huggingface.co/spaces/MSherbinii/ipad-vad-training/resolve/main/clear_cache.py
428 Bytes
| #!/usr/bin/env python3 | |
| """Clear Python cache before starting app""" | |
| import os | |
| import shutil | |
| from pathlib import Path | |
| # Clear all __pycache__ directories | |
| for pycache in Path('.').rglob('__pycache__'): | |
| print(f"Removing {pycache}") | |
| shutil.rmtree(pycache, ignore_errors=True) | |
| # Clear .pyc files | |
| for pyc in Path('.').rglob('*.pyc'): | |
| print(f"Removing {pyc}") | |
| pyc.unlink(missing_ok=True) | |
| print("✅ Cache cleared!") | |