Spaces:
Running
Running
Replace date
Browse files
app.py
CHANGED
@@ -27,9 +27,9 @@ def update_datasets():
|
|
27 |
)
|
28 |
repo.git_pull()
|
29 |
os.makedirs("dataset/data", exist_ok=True)
|
30 |
-
|
31 |
-
with repo.commit(f"Add {
|
32 |
-
with open(f"data/{
|
33 |
json.dump([ds.id for ds in sorted(datasets, key=lambda item: item.id)], f)
|
34 |
|
35 |
|
|
|
27 |
)
|
28 |
repo.git_pull()
|
29 |
os.makedirs("dataset/data", exist_ok=True)
|
30 |
+
today = datetime.datetime.now(datetime.timezone.utc).date().isoformat()
|
31 |
+
with repo.commit(f"Add {today} data file"):
|
32 |
+
with open(f"data/{today}.json", "w") as f:
|
33 |
json.dump([ds.id for ds in sorted(datasets, key=lambda item: item.id)], f)
|
34 |
|
35 |
|