mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 21:29:11 +00:00
Update unit tests, files with removing model suffix to config types
This commit is contained in:
@@ -15,7 +15,7 @@ from sentence_transformers import SentenceTransformer, CrossEncoder, util
|
||||
from src.utils.helpers import get_absolute_path, resolve_absolute_path
|
||||
from src.processor.org_mode.org_to_jsonl import org_to_jsonl
|
||||
from src.utils.config import TextSearchModel
|
||||
from src.utils.rawconfig import TextSearchConfigModel
|
||||
from src.utils.rawconfig import TextSearchConfig
|
||||
|
||||
|
||||
def initialize_model():
|
||||
@@ -149,7 +149,7 @@ def collate_results(hits, entries, count=5):
|
||||
in hits[0:count]]
|
||||
|
||||
|
||||
def setup(config: TextSearchConfigModel, regenerate: bool, verbose: bool) -> TextSearchModel:
|
||||
def setup(config: TextSearchConfig, regenerate: bool, verbose: bool) -> TextSearchModel:
|
||||
# Initialize Model
|
||||
bi_encoder, cross_encoder, top_k = initialize_model()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import torch
|
||||
from src.utils.helpers import resolve_absolute_path
|
||||
import src.utils.exiftool as exiftool
|
||||
from src.utils.config import ImageSearchModel
|
||||
from src.utils.rawconfig import ImageSearchConfigModel
|
||||
from src.utils.rawconfig import ImageSearchConfig
|
||||
|
||||
|
||||
def initialize_model():
|
||||
@@ -154,7 +154,7 @@ def collate_results(hits, image_names, image_directory, count=5):
|
||||
in hits[0:count]]
|
||||
|
||||
|
||||
def setup(config: ImageSearchConfigModel, regenerate: bool, verbose: bool) -> ImageSearchModel:
|
||||
def setup(config: ImageSearchConfig, regenerate: bool, verbose: bool) -> ImageSearchModel:
|
||||
# Initialize Model
|
||||
encoder = initialize_model()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from sentence_transformers import SentenceTransformer, CrossEncoder, util
|
||||
from src.utils.helpers import get_absolute_path, resolve_absolute_path
|
||||
from src.processor.ledger.beancount_to_jsonl import beancount_to_jsonl
|
||||
from src.utils.config import TextSearchModel
|
||||
from src.utils.rawconfig import TextSearchConfigModel
|
||||
from src.utils.rawconfig import TextSearchConfig
|
||||
|
||||
|
||||
def initialize_model():
|
||||
@@ -141,7 +141,7 @@ def collate_results(hits, entries, count=5):
|
||||
in hits[0:count]]
|
||||
|
||||
|
||||
def setup(config: TextSearchConfigModel, regenerate: bool, verbose: bool) -> TextSearchModel:
|
||||
def setup(config: TextSearchConfig, regenerate: bool, verbose: bool) -> TextSearchModel:
|
||||
# Initialize Model
|
||||
bi_encoder, cross_encoder, top_k = initialize_model()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user