Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ def process_ebook(ebook_file):
|
|
7 |
# Ensure input_files folder exists
|
8 |
input_dir = "input_files"
|
9 |
os.makedirs(input_dir, exist_ok=True)
|
10 |
-
|
11 |
# Save the uploaded file to the input_files folder
|
12 |
ebook_file_path = os.path.join(input_dir, ebook_file.name)
|
13 |
|
@@ -20,7 +19,12 @@ def process_ebook(ebook_file):
|
|
20 |
input_files_str = "\n".join(input_files_list)
|
21 |
|
22 |
# Print the list of input files in the terminal
|
23 |
-
print("Files in input_files folder:", input_files_str)
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
# Call the Auto_VoxNovel.py script and stream its output live
|
26 |
try:
|
|
|
7 |
# Ensure input_files folder exists
|
8 |
input_dir = "input_files"
|
9 |
os.makedirs(input_dir, exist_ok=True)
|
|
|
10 |
# Save the uploaded file to the input_files folder
|
11 |
ebook_file_path = os.path.join(input_dir, ebook_file.name)
|
12 |
|
|
|
19 |
input_files_str = "\n".join(input_files_list)
|
20 |
|
21 |
# Print the list of input files in the terminal
|
22 |
+
print("Files in input_files folder:[", input_files_str "]")
|
23 |
+
|
24 |
+
if not os.listdir("input_files"):
|
25 |
+
raise FileNotFoundError("The folder 'input_files' is empty.")
|
26 |
+
|
27 |
+
|
28 |
|
29 |
# Call the Auto_VoxNovel.py script and stream its output live
|
30 |
try:
|