Shroogawh24 commited on
Commit
e413f0b
1 Parent(s): 7f402d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,15 +11,15 @@ from langchain.embeddings.openai import OpenAIEmbeddings
11
 
12
  from sentence_transformers import SentenceTransformer
13
 
14
- embeddings = OpenAIEmbeddings()
15
 
16
  embedder = SentenceTransformer('all-mpnet-base-v2')
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", embedder, allow_dangerous_deserialization=True)
23
  parser = StrOutputParser()
24
 
25
  # Load your data (e.g., a DataFrame)
 
11
 
12
  from sentence_transformers import SentenceTransformer
13
 
14
+ #embeddings = OpenAIEmbeddings()
15
 
16
  embedder = SentenceTransformer('all-mpnet-base-v2')
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", embedder, allow_dangerous_deserialization=True)
23
  parser = StrOutputParser()
24
 
25
  # Load your data (e.g., a DataFrame)