Spaces:
Runtime error
Runtime error
add api to push_to_repo
Browse files
utils.py
CHANGED
@@ -354,7 +354,7 @@ def batch_embed(
|
|
354 |
|
355 |
# Periodically upload to the hub
|
356 |
if len(embeds) > upload_batch_size:
|
357 |
-
push_to_repo(repo, last_count, current_count, embeds, texts)
|
358 |
embeds = []
|
359 |
texts = []
|
360 |
last_count = current_count
|
@@ -372,7 +372,7 @@ def batch_embed(
|
|
372 |
|
373 |
# If there are any remaining embeddings, upload them
|
374 |
if len(embeds) > 0:
|
375 |
-
push_to_repo(repo, last_count, current_count, embeds, texts)
|
376 |
|
377 |
return current_count - num2skip, time_taken
|
378 |
|
|
|
354 |
|
355 |
# Periodically upload to the hub
|
356 |
if len(embeds) > upload_batch_size:
|
357 |
+
push_to_repo(repo, last_count, current_count, embeds, texts, api)
|
358 |
embeds = []
|
359 |
texts = []
|
360 |
last_count = current_count
|
|
|
372 |
|
373 |
# If there are any remaining embeddings, upload them
|
374 |
if len(embeds) > 0:
|
375 |
+
push_to_repo(repo, last_count, current_count, embeds, texts, api)
|
376 |
|
377 |
return current_count - num2skip, time_taken
|
378 |
|