Spaces:
Runtime error
Runtime error
Fix timestamps
Browse files
app.py
CHANGED
@@ -62,7 +62,11 @@ def format_submissions(submissions):
|
|
62 |
if "_XXX_" in submission_name:
|
63 |
submission_name = submission_name.replace("_XXX_", " ")
|
64 |
submission_data["Submission Name"].append(submission_name)
|
65 |
-
|
|
|
|
|
|
|
|
|
66 |
submission_data["Submission Date"].append(datetime.date(timestamp).strftime("%b %d, %Y"))
|
67 |
|
68 |
for task in card_data["results"]:
|
|
|
62 |
if "_XXX_" in submission_name:
|
63 |
submission_name = submission_name.replace("_XXX_", " ")
|
64 |
submission_data["Submission Name"].append(submission_name)
|
65 |
+
# Handle mismatch in epoch microseconds vs epoch seconds in new AutoTrain API
|
66 |
+
if len(timestamp) > 10:
|
67 |
+
timestamp = pd.to_datetime(int(timestamp))
|
68 |
+
else:
|
69 |
+
timestamp = pd.to_datetime(int(timestamp), unit="s")
|
70 |
submission_data["Submission Date"].append(datetime.date(timestamp).strftime("%b %d, %Y"))
|
71 |
|
72 |
for task in card_data["results"]:
|