Spaces:
Running
Running
| import tarfile | |
| import os | |
| archive_path = "data/raw/emotion/IMDB.tar.gz" | |
| extract_path = "data/raw/emotion/aclImdb" | |
| os.makedirs(extract_path, exist_ok=True) | |
| print(f"[INFO] Extracting {archive_path} ...") | |
| with tarfile.open(archive_path, "r:gz") as tar: | |
| tar.extractall(path=extract_path) | |
| print(f"[INFO] Extraction complete: {extract_path}") | |