-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
24 lines (19 loc) · 823 Bytes
/
app.py
File metadata and controls
24 lines (19 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from src.data_loader import load_all_documents
from src.vectorstore import FaissVectorStore
from src.search import RAGSearch
from src.embedding import EmbeddingPipeline
# Example usage
if __name__ == "__main__":
# docs = load_all_documents("data")
##FOR CHECK EMBEDDING WORK OR NOT
# chunks=EmbeddingPipeline().chunk_documents(docs)
# chunkvectors= EmbeddingPipeline().embed_chunks(chunks)
# print(chunkvectors)
store = FaissVectorStore("faiss_store")
# store.build_from_documents(docs) ## there is no need to run again and again untill new file not come
store.load()
# print(store.query("What is skills?", top_k=3))
rag_search = RAGSearch()
query = "What is inside pojects?"
summary = rag_search.search_and_summarize(query, top_k=3)
print("Summary:", summary)