Anuj-Panthri commited on
Commit
8a74fe1
·
1 Parent(s): 87c4a7b
Files changed (1) hide show
  1. src/utils/data_utils.py +2 -1
src/utils/data_utils.py CHANGED
@@ -24,7 +24,8 @@ def download_personal_hf_dataset(name):
24
 
25
  def unzip_file(file_path,destination_dir):
26
  """unzips file to destination_dir"""
27
- shutil.rmtree(destination_dir)
 
28
  os.makedirs(destination_dir)
29
  with ZipFile(file_path,"r") as zip:
30
  zip.extractall(destination_dir)
 
24
 
25
  def unzip_file(file_path,destination_dir):
26
  """unzips file to destination_dir"""
27
+ if os.path.exists(destination_dir):
28
+ shutil.rmtree(destination_dir)
29
  os.makedirs(destination_dir)
30
  with ZipFile(file_path,"r") as zip:
31
  zip.extractall(destination_dir)