From 0fd41b05692085e8e4dab75a59f4c56ba4ac5ea7 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 24 Apr 2024 21:46:14 +0200 Subject: Add tqdm for encoding documents --- rag/retriever/encoder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rag/retriever/encoder.py b/rag/retriever/encoder.py index 68d0e26..6176a37 100644 --- a/rag/retriever/encoder.py +++ b/rag/retriever/encoder.py @@ -7,6 +7,7 @@ import ollama from langchain_core.documents import Document from loguru import logger as log from qdrant_client.http.models import StrictFloat +from tqdm import tqdm from .vector import Point @@ -34,7 +35,7 @@ class Encoder: "source": self.__get_source(chunk.metadata), }, ) - for chunk in chunks + for chunk in tqdm(chunks) ] def encode_query(self, query: str) -> List[StrictFloat]: -- cgit v1.2.3-70-g09d2