Update app.py
Browse files
app.py
CHANGED
@@ -1,24 +1,13 @@
|
|
1 |
-
import zipfile
|
2 |
import os
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
zip_ref.extractall(extract_dir)
|
16 |
-
|
17 |
-
# Confirm the extraction
|
18 |
-
extracted_files = os.listdir(extract_dir)
|
19 |
-
print(f"Extraction completed. Extracted files: {extracted_files}")
|
20 |
-
|
21 |
-
except zipfile.BadZipFile:
|
22 |
-
print(f"Error: {zip_path} is not a valid ZIP file.")
|
23 |
-
except Exception as e:
|
24 |
-
print(f"Error during extraction: {e}")
|
|
|
|
|
1 |
import os
|
2 |
|
3 |
+
required_files = [
|
4 |
+
"model/kokoro-v1_0.pth",
|
5 |
+
"model/config.json",
|
6 |
+
# Add other essential files here
|
7 |
+
]
|
8 |
+
|
9 |
+
for file in required_files:
|
10 |
+
if not os.path.exists(file):
|
11 |
+
print(f"Error: Required file {file} not found!")
|
12 |
+
else:
|
13 |
+
print(f"File {file} is present.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|