mikeion commited on
Commit
e3ceee1
·
1 Parent(s): 6918c7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -117,6 +117,7 @@ class Chatbot():
117
  embedding_model = "text-embedding-ada-002"
118
  # This is going to create embeddings for subsets of the PDF
119
  embeddings = np.vstack(df.text.apply(lambda x: get_embedding(x, engine=embedding_model)))
 
120
  return embeddings
121
 
122
  def search_embeddings(self, embeddings, df, query, n=3, pprint=True):
 
117
  embedding_model = "text-embedding-ada-002"
118
  # This is going to create embeddings for subsets of the PDF
119
  embeddings = np.vstack(df.text.apply(lambda x: get_embedding(x, engine=embedding_model)))
120
+ embeddings = np.array(embeddings, dtype=np.float32)
121
  return embeddings
122
 
123
  def search_embeddings(self, embeddings, df, query, n=3, pprint=True):