VectorMind / backend /testv.py
Ash-211's picture
feat: add frontend and backend code for multimodal RAG knowledge assistant
2db8ee1
Raw
History Blame Contribute Delete
574 Bytes
from vectorstore.text_store import TextVectorStore
from vectorstore.image_store import ImageVectorStore
import glob
image_paths = glob.glob("../data/processed/images/*.png")
# TEXT
text_store = TextVectorStore()
text_store.add_texts(
["Git is a version control system", "Docker uses containers"],
[{"src": "pdf"}, {"src": "pdf"}]
)
print(text_store.search("What is git?"))
# IMAGE
image_store = ImageVectorStore()
image_store.add_images(
image_paths,
[{"page": i} for i in range(len(image_paths))]
)
print(image_store.search("types of operating systems"))