fix: linting

This commit is contained in:
Alex
2024-12-23 17:41:44 +00:00
parent 90962ee056
commit 41b4c28430
3 changed files with 3 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import re
from typing import List, Tuple, Union
from typing import List, Tuple
import logging
from application.parser.schema.base import Document
from application.utils import get_encoding

View File

@@ -61,7 +61,7 @@ def embed_and_store_documents(docs, folder_name, source_id, task_status):
# Process and embed documents
for idx, doc in tqdm(
docs,
enumerate(docs),
desc="Embedding 🦖",
unit="docs",
total=total_docs,
@@ -69,7 +69,7 @@ def embed_and_store_documents(docs, folder_name, source_id, task_status):
):
try:
# Update task status for progress tracking
progress = int((idx / total_docs) * 100)
progress = int(((idx + 1) / total_docs) * 100)
task_status.update_state(state="PROGRESS", meta={"current": progress})
# Add document to vector store