Test-API / src /setting.py
lpetrl's picture
feat(API): Implemented basic functionality.
94e8fb8 verified
from types import SimpleNamespace
metrics_cfg = SimpleNamespace(
metric="cosine",
threshold=0.5,
)
db_cfg = SimpleNamespace(
db_name="lancedb",
table_name="MiniLM-L12-v",
folder_path="database",
metrics=metrics_cfg
)
model_cfg = SimpleNamespace(
language="ukr",
name="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
task="sentence-transformers",
)
CFG = SimpleNamespace(
vocab_path="data/ukrainian_nouns.txt",
model=model_cfg,
db=db_cfg,
)
with open(CFG.vocab_path, "r") as file:
AVAILABLE_WORDS = [line.strip() for line in file.readlines()]