Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,18 @@
|
|
| 1 |
import zipfile
|
| 2 |
-
|
| 3 |
-
zip_file_path = "defaults.zip" # ุงุณุชุจุฏู "your_file.zip" ุจุงุณู
ุงูู
ูู ุงููุนูู ุงููู ุฑูุนุชู
|
| 4 |
|
| 5 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
| 7 |
-
zip_ref.extractall(
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
print("ุชู
ูู ุถุบุท ุงูู
ูู ุจูุฌุงุญ ูู ุงูู
ุณุงุฑ ุงูุฑุฆูุณู!")
|
|
|
|
| 1 |
import zipfile
|
| 2 |
+
import os
|
|
|
|
| 3 |
|
| 4 |
+
# ุงุณู
ู
ูู ุงูู zip
|
| 5 |
+
zip_file_path = "defaults.zip" # ุบูุฑ "your_file.zip" ูุงุณู
ุงูู
ูู ุงููู ุฑูุนุชู
|
| 6 |
+
|
| 7 |
+
# ู
ุณุงุฑ ุฌุฏูุฏ ููู ุงูู
ููุงุช ููู
|
| 8 |
+
extract_path = "./output" # ููุนู
ู ู
ุฌูุฏ ุงุณู
ู "output" ูู ุงูู
ุดุฑูุน
|
| 9 |
+
|
| 10 |
+
# ุงุชุฃูุฏ ุฅู ุงูู
ุฌูุฏ ู
ูุฌูุฏุ ููู ู
ุด ู
ูุฌูุฏ ููุนู
ูู
|
| 11 |
+
os.makedirs(extract_path, exist_ok=True)
|
| 12 |
+
|
| 13 |
+
# ูู ุถุบุท ุงูู
ูู ูู ุงูู
ุฌูุฏ ุงูู
ุญุฏุฏ
|
| 14 |
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
| 15 |
+
zip_ref.extractall(extract_path)
|
| 16 |
+
|
| 17 |
+
print("ุชู
ูู ุงูุถุบุท ูู ู
ุฌูุฏ 'output'!")
|
| 18 |
|
|
|