Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,7 @@
|
|
1 |
import os
|
2 |
-
import zipfile
|
3 |
|
4 |
-
# Path to the zip file and extraction directory
|
5 |
zip_path = "model/kokoro-v1_0.zip"
|
6 |
-
|
7 |
-
|
8 |
-
# Check if the extracted directory exists
|
9 |
-
if not os.path.exists(os.path.join(extract_dir, "kokoro-v1_0")): # Replace "kokoro-v1_0" with an expected file/folder name
|
10 |
-
print(f"Extracting {zip_path}...")
|
11 |
-
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
12 |
-
zip_ref.extractall(extract_dir)
|
13 |
-
print(f"Extraction completed. Files extracted to {extract_dir}")
|
14 |
else:
|
15 |
-
print(f"
|
|
|
1 |
import os
|
|
|
2 |
|
|
|
3 |
zip_path = "model/kokoro-v1_0.zip"
|
4 |
+
if not os.path.exists(zip_path):
|
5 |
+
raise FileNotFoundError(f"ZIP file not found at {zip_path}")
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
else:
|
7 |
+
print(f"ZIP file found at {zip_path}")
|