Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -112,7 +112,7 @@ def get_pinecone_index(database_id: str) -> Index:
|
|
112 |
if not database_id in pc.list_indexes():
|
113 |
pc.create_index(
|
114 |
database_id,
|
115 |
-
dimension=
|
116 |
spec=ServerlessSpec(
|
117 |
cloud='aws',
|
118 |
region='us-east-1'
|
@@ -153,8 +153,8 @@ def add_to_voyage(person_name: str, person_projects: list) -> None:
|
|
153 |
# create list of (id, vector, metadata) tuples to be upserted
|
154 |
to_upsert = list(zip(ids, embeds, meta))
|
155 |
|
156 |
-
for i in range(0,
|
157 |
-
i_end = min(i+VOYAGEAI_BATCH_SIZE,
|
158 |
index.upsert(vectors=to_upsert[i:i_end])
|
159 |
|
160 |
# let's view the index statistics
|
|
|
112 |
if not database_id in pc.list_indexes():
|
113 |
pc.create_index(
|
114 |
database_id,
|
115 |
+
dimension=VOYAGEAI_VECTOR_DIM,
|
116 |
spec=ServerlessSpec(
|
117 |
cloud='aws',
|
118 |
region='us-east-1'
|
|
|
153 |
# create list of (id, vector, metadata) tuples to be upserted
|
154 |
to_upsert = list(zip(ids, embeds, meta))
|
155 |
|
156 |
+
for i in range(0, len(ids), VOYAGEAI_BATCH_SIZE):
|
157 |
+
i_end = min(i+VOYAGEAI_BATCH_SIZE, len(ids))
|
158 |
index.upsert(vectors=to_upsert[i:i_end])
|
159 |
|
160 |
# let's view the index statistics
|