Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def swap_face(source_file, target_file, doFaceEnhancer, skey):
|
|
64 |
raise Exception("verify authkey failed.")
|
65 |
timestamp_requested = int(skey["t"])
|
66 |
timestamp_now = int(datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).timestamp())
|
67 |
-
if timestamp_now - timestamp_requested >
|
68 |
raise Exception(f"authkey timeout, {timestamp_now - timestamp_requested}")
|
69 |
print(f"authkey pass, {timestamp_now - timestamp_requested}")
|
70 |
source_path = "input.jpg"
|
|
|
64 |
raise Exception("verify authkey failed.")
|
65 |
timestamp_requested = int(skey["t"])
|
66 |
timestamp_now = int(datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).timestamp())
|
67 |
+
if timestamp_now - timestamp_requested > 600:
|
68 |
raise Exception(f"authkey timeout, {timestamp_now - timestamp_requested}")
|
69 |
print(f"authkey pass, {timestamp_now - timestamp_requested}")
|
70 |
source_path = "input.jpg"
|