Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
"model/config.json",
|
| 6 |
-
# Add other essential files here
|
| 7 |
-
]
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
| 1 |
+
import zipfile
|
| 2 |
import os
|
| 3 |
|
| 4 |
+
zip_path = "model/kokoro-v1_0.zip"
|
| 5 |
+
extract_dir = "model/"
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
if zipfile.is_zipfile(zip_path):
|
| 8 |
+
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
| 9 |
+
zip_ref.extractall(extract_dir)
|
| 10 |
+
print("Extraction completed.")
|
| 11 |
+
else:
|
| 12 |
+
print("Not a valid ZIP file.")
|