Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -82,19 +82,8 @@ def swap_face(source_file, target_file, doFaceEnhancer):
|
|
82 |
# Create date-based folder
|
83 |
folder_path, date_folder = dataset_handler.create_date_folder()
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
# Phân tách thành từng thành phần
|
89 |
-
seconds = now.strftime("%S") # Giây
|
90 |
-
minutes = now.strftime("%M") # Phút
|
91 |
-
hours = now.strftime("%H") # Giờ
|
92 |
-
day = now.strftime("%d") # Ngày
|
93 |
-
month = now.strftime("%m") # Tháng
|
94 |
-
year = now.strftime("%Y") # Năm
|
95 |
-
|
96 |
-
# Kết hợp lại thành timestamp
|
97 |
-
timestamp = f"{seconds}{minutes}{hours}{day}{month}{year}"
|
98 |
|
99 |
# Save input images with timestamp in folder
|
100 |
source_path = os.path.join(folder_path, f"source_{timestamp}.jpg")
|
|
|
82 |
# Create date-based folder
|
83 |
folder_path, date_folder = dataset_handler.create_date_folder()
|
84 |
|
85 |
+
# Generate timestamp for unique identification
|
86 |
+
timestamp = datetime.now().strftime("%S-%M-%H-%d-%m-%Y")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
# Save input images with timestamp in folder
|
89 |
source_path = os.path.join(folder_path, f"source_{timestamp}.jpg")
|