Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -117,7 +117,7 @@ class Chatbot():
|
|
117 |
embedding_model = "text-embedding-ada-002"
|
118 |
# Get the embeddings for each text element in the dataframe
|
119 |
embeddings = df.text.apply(lambda x: get_embedding(x, engine=embedding_model))
|
120 |
-
embeddings = np.
|
121 |
return embeddings
|
122 |
|
123 |
def search_embeddings(self, embeddings, df, query, n=3, pprint=True):
|
|
|
117 |
embedding_model = "text-embedding-ada-002"
|
118 |
# Get the embeddings for each text element in the dataframe
|
119 |
embeddings = df.text.apply(lambda x: get_embedding(x, engine=embedding_model))
|
120 |
+
embeddings = np.vstack(embeddings, dtype=np.float32)
|
121 |
return embeddings
|
122 |
|
123 |
def search_embeddings(self, embeddings, df, query, n=3, pprint=True):
|