Rahul-8799 commited on
Commit
0a99e54
·
verified ·
1 Parent(s): 69f88d2

Upload zip_output.py

Browse files
Files changed (1) hide show
  1. utils/zip_output.py +14 -0
utils/zip_output.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import zipfile
2
+ import os
3
+
4
+ def zip_output():
5
+ zip_filename = "output_bundle.zip"
6
+ zip_path = f"output/{zip_filename}"
7
+
8
+ with zipfile.ZipFile(zip_path, "w") as zipf:
9
+ for folder, _, files in os.walk("output"):
10
+ for file in files:
11
+ if file != zip_filename:
12
+ zipf.write(os.path.join(folder, file), arcname=file)
13
+
14
+ return zip_path