text2image / unzip.py
konstantinG's picture
Update unzip.py
b4f0c6f
raw history blame
No virus
289 Bytes
import os
import zipfile
def unzip(zip_file):
zip_filename = zip_file
target_dir = 'img'
if not os.path.exists(target_dir):
os.makedirs(target_dir)
with zipfile.ZipFile(zip_filename, 'r') as zip_ref:
zip_ref.extractall(target_dir)