AlirezaHSZ commited on
Commit
f2af07e
·
verified ·
1 Parent(s): 76b8a71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -35,8 +35,7 @@ def get_text_chunks(text):
35
  # Function to get embeddings for each chunk and save to vector store
36
  def get_vector_store(chunks):
37
  try:
38
- # embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
39
- embeddings = aiplatform.GoogleGenerativeAIEmbeddings(model="text-embedding-004")
40
  vector_store = FAISS.from_texts(chunks, embedding=embeddings)
41
  vector_store.save_local("faiss_index")
42
  except (GoogleAPIError, InvalidArgument):
 
35
  # Function to get embeddings for each chunk and save to vector store
36
  def get_vector_store(chunks):
37
  try:
38
+ embeddings = GoogleGenerativeAIEmbeddings(model="models/text-embedding-004")
 
39
  vector_store = FAISS.from_texts(chunks, embedding=embeddings)
40
  vector_store.save_local("faiss_index")
41
  except (GoogleAPIError, InvalidArgument):