Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -142,9 +142,10 @@ def main(args):
|
|
142 |
# first_coeff_path, crop_pic_path, crop_info = preprocess_model.generate(pic_path, first_frame_dir, args.preprocess,\
|
143 |
# source_image_flag=True, pic_size=args.size)
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
|
|
148 |
|
149 |
if os.path.exists(preprocessed_data_path) and image_hardcoded == "yes":
|
150 |
print("Loading preprocessed data...")
|
@@ -547,7 +548,7 @@ def check_generation_status():
|
|
547 |
print("Deleted video file:", final_video_path)
|
548 |
|
549 |
# TEMP_DIR.cleanup()
|
550 |
-
preprocess_dir = os.path.join(
|
551 |
custom_cleanup(TEMP_DIR.name, preprocess_dir)
|
552 |
|
553 |
print("Temporary files cleaned up, but preprocess_data is retained.")
|
|
|
142 |
# first_coeff_path, crop_pic_path, crop_info = preprocess_model.generate(pic_path, first_frame_dir, args.preprocess,\
|
143 |
# source_image_flag=True, pic_size=args.size)
|
144 |
|
145 |
+
|
146 |
+
fixed_temp_dir = "/tmp/preprocess_data"
|
147 |
+
os.makedirs(fixed_temp_dir, exist_ok=True)
|
148 |
+
preprocessed_data_path = os.path.join(fixed_temp_dir, "preprocessed_data.pkl")
|
149 |
|
150 |
if os.path.exists(preprocessed_data_path) and image_hardcoded == "yes":
|
151 |
print("Loading preprocessed data...")
|
|
|
548 |
print("Deleted video file:", final_video_path)
|
549 |
|
550 |
# TEMP_DIR.cleanup()
|
551 |
+
preprocess_dir = os.path.join("/tmp", "preprocess_data")
|
552 |
custom_cleanup(TEMP_DIR.name, preprocess_dir)
|
553 |
|
554 |
print("Temporary files cleaned up, but preprocess_data is retained.")
|