Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor sentence transformer to fastembedding #38

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bbconf/bbconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # to suppress verbose warnings tensorflow
from geniml.text2bednn import text2bednn
from geniml.search import QdrantBackend
from sentence_transformers import SentenceTransformer
from fastembed.embedding import FlagEmbedding
from geniml.region2vec import Region2VecExModel
from geniml.io import RegionSet

Expand Down Expand Up @@ -510,8 +510,8 @@ def _create_t2bsi_object(self) -> Union[text2bednn.Text2BEDSearchInterface, None

try:
return text2bednn.Text2BEDSearchInterface(
nl2vec_model=SentenceTransformer(
os.getenv("HF_MODEL", DEFAULT_HF_MODEL)
nl2vec_model=FlagEmbedding(
model_name=os.getenv("HF_MODEL", DEFAULT_HF_MODEL)
),
vec2vec_model=self._config[CFG_PATH_KEY][CFG_PATH_VEC2VEC_KEY],
search_backend=self.qdrant_backend,
Expand Down
Loading