Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -269,7 +269,7 @@ def batch_embed(
|
|
269 |
|
270 |
username = api.whoami()["name"]
|
271 |
|
272 |
-
if "/" in new_dataset_id:
|
273 |
new_dataset_id = username + "/" + new_dataset_id
|
274 |
|
275 |
repo = init_git_repo(new_dataset_id)
|
@@ -450,3 +450,10 @@ def push_to_repo(
|
|
450 |
blocking=False,
|
451 |
auto_lfs_prune=True,
|
452 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
username = api.whoami()["name"]
|
271 |
|
272 |
+
if "/" not in new_dataset_id:
|
273 |
new_dataset_id = username + "/" + new_dataset_id
|
274 |
|
275 |
repo = init_git_repo(new_dataset_id)
|
|
|
450 |
blocking=False,
|
451 |
auto_lfs_prune=True,
|
452 |
)
|
453 |
+
|
454 |
+
most_recent_file = f"embeddings_{last_count}_{current_count}.parquet"
|
455 |
+
|
456 |
+
# Delete old files
|
457 |
+
for f in data_dir.glob("*.parquet"):
|
458 |
+
if f.name != most_recent_file:
|
459 |
+
f.unlink()
|