Spaces:
Runtime error
Runtime error
DiamondYin
commited on
Commit
·
ca27af0
1
Parent(s):
f71f3ee
Update app_utils.py
Browse files- app_utils.py +2 -2
app_utils.py
CHANGED
@@ -44,9 +44,9 @@ def initialize_knowledge_base():
|
|
44 |
|
45 |
# Embed each chunk of text
|
46 |
embeddings = []
|
47 |
-
|
48 |
for doc in doc_texts:
|
49 |
-
embedding =
|
50 |
embeddings.append(embedding)
|
51 |
|
52 |
vStore = np.concatenate(embeddings, axis=0)
|
|
|
44 |
|
45 |
# Embed each chunk of text
|
46 |
embeddings = []
|
47 |
+
openAI_embeddings = OpenAIEmbeddings()
|
48 |
for doc in doc_texts:
|
49 |
+
embedding = Chroma.from_documents(doc, openAI_embeddings)
|
50 |
embeddings.append(embedding)
|
51 |
|
52 |
vStore = np.concatenate(embeddings, axis=0)
|