Spaces:
Sleeping
Sleeping
File size: 471 Bytes
e34a93e a02ec79 e34a93e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import logging
import lancedb
import os
from pathlib import Path
from sentence_transformers import SentenceTransformer
EMB_MODEL_NAME = 'BAAI/llm-embedder'
DB_TABLE_NAME = "Cus_manual_"
# Setting up the logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
retriever = SentenceTransformer(EMB_MODEL_NAME)
# db
db_uri = os.path.join(Path(__file__).parents[1], ".lancedb")
db = lancedb.connect(db_uri)
table = db.open_table(DB_TABLE_NAME)
|