Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -159,16 +159,23 @@ def main(args):
|
|
159 |
else:
|
160 |
print("Running preprocessing...")
|
161 |
first_coeff_path, crop_pic_path, crop_info = preprocess_model.generate(pic_path, first_frame_dir, args.preprocess, source_image_flag=True)
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
with open(preprocessed_data_path, "wb") as f:
|
167 |
pickle.dump(preprocessed_data, f)
|
168 |
print(f"Preprocessed data saved to: {preprocessed_data_path}")
|
169 |
|
170 |
-
print('first_coeff_path ',
|
171 |
-
print('crop_pic_path ',
|
|
|
172 |
|
173 |
if first_coeff_path is None:
|
174 |
print("Can't get the coeffs of the input")
|
|
|
159 |
else:
|
160 |
print("Running preprocessing...")
|
161 |
first_coeff_path, crop_pic_path, crop_info = preprocess_model.generate(pic_path, first_frame_dir, args.preprocess, source_image_flag=True)
|
162 |
+
first_coeff_new_path = os.path.join(fixed_temp_dir, os.path.basename(first_coeff_path))
|
163 |
+
crop_pic_new_path = os.path.join(fixed_temp_dir, os.path.basename(crop_pic_path))
|
164 |
+
crop_info_new_path = os.path.join(fixed_temp_dir, os.path.basename(crop_info))
|
165 |
+
shutil.move(first_coeff_path, first_coeff_new_path)
|
166 |
+
shutil.move(crop_pic_path, crop_pic_new_path)
|
167 |
+
shutil.move(crop_info, crop_info_new_path)
|
168 |
+
preprocessed_data = {"first_coeff_path": first_coeff_new_path,
|
169 |
+
"crop_pic_path": crop_pic_new_path,
|
170 |
+
"crop_info": crop_info_new_path}
|
171 |
|
172 |
with open(preprocessed_data_path, "wb") as f:
|
173 |
pickle.dump(preprocessed_data, f)
|
174 |
print(f"Preprocessed data saved to: {preprocessed_data_path}")
|
175 |
|
176 |
+
print('first_coeff_path ',first_coeff_new_path)
|
177 |
+
print('crop_pic_path ',crop_pic_new_path)
|
178 |
+
print('crop_info ',crop_info_new_path)
|
179 |
|
180 |
if first_coeff_path is None:
|
181 |
print("Can't get the coeffs of the input")
|