Shroogawh24 commited on
Commit
250878c
1 Parent(s): 4638db8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,13 +13,13 @@ from sentence_transformers import SentenceTransformer
13
 
14
  embeddings = OpenAIEmbeddings()
15
 
16
- #embedding_function = SentenceTransformer("BAAI/bge-large-en-v1.5")
17
 
18
  # Set the OpenAI API key
19
  openai.api_key = os.getenv("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")
20
 
21
  # Load the FAISS index using LangChain's FAISS implementation
22
- db = FAISS.load_local("Faiss", embeddings, allow_dangerous_deserialization=True)
23
  parser = StrOutputParser()
24
 
25
  # Load your data (e.g., a DataFrame)
 
13
 
14
  embeddings = OpenAIEmbeddings()
15
 
16
+ embedding_function = SentenceTransformer("BAAI/bge-large-en-v1.5")
17
 
18
  # Set the OpenAI API key
19
  openai.api_key = os.getenv("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")
20
 
21
  # Load the FAISS index using LangChain's FAISS implementation
22
+ db = FAISS.load_local("Faiss_indexes", embedding_function, allow_dangerous_deserialization=True)
23
  parser = StrOutputParser()
24
 
25
  # Load your data (e.g., a DataFrame)