sunbal7 commited on
Commit
b6ef89b
·
verified ·
1 Parent(s): 2d28c51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,14 +6,14 @@ from langchain.chains import RetrievalQA
6
  from langchain_community.vectorstores import FAISS # ✅ FIXED IMPORT
7
  from langchain.embeddings import SentenceTransformerEmbeddings
8
  from langchain.llms import OpenAI
9
-
10
  # Initialize ChromaDB for Retrieval-Augmented Generation (RAG)
11
  chroma_client = chromadb.PersistentClient(path="./chroma_db")
12
  embedding_model = SentenceTransformerEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
13
 
14
  # Load the RAG-based Retrieval System
15
- import os
16
- print(os.listdir("faiss_index"))
17
 
18
  vectorstore = FAISS.load_local("faiss_index", embedding_model)
19
  retriever = vectorstore.as_retriever()
 
6
  from langchain_community.vectorstores import FAISS # ✅ FIXED IMPORT
7
  from langchain.embeddings import SentenceTransformerEmbeddings
8
  from langchain.llms import OpenAI
9
+ import os
10
  # Initialize ChromaDB for Retrieval-Augmented Generation (RAG)
11
  chroma_client = chromadb.PersistentClient(path="./chroma_db")
12
  embedding_model = SentenceTransformerEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
13
 
14
  # Load the RAG-based Retrieval System
15
+
16
+ os.listdir("faiss_index")
17
 
18
  vectorstore = FAISS.load_local("faiss_index", embedding_model)
19
  retriever = vectorstore.as_retriever()