Initialize embeddings to empty list before processing

This commit is contained in:
sabaimran
2024-01-18 13:26:38 +05:30
parent 24af888c41
commit 93d5cb128c

View File

@@ -48,6 +48,7 @@ class EmbeddingsModel:
"Authorization": f"Bearer {self.api_key}",
"Content-Type": "application/json",
}
embeddings = []
with tqdm.tqdm(total=len(docs)) as pbar:
for i in range(0, len(docs), 1000):
payload = {"inputs": docs[i : i + 1000]}