bluesearch.server.search_server module¶
The search server.
- class SearchServer(trained_models_path, embeddings_h5_path, indices, connection, models)[source]¶
Bases:
flask.app.Flask
The BBS search server.
- Parameters
trained_models_path (str or pathlib.Path) – The folder containing pre-trained models.
embeddings_h5_path (str or pathlib.Path) – The path to the h5 file containing pre-computed embeddings.
connection (sqlalchemy.engine.Engine) – The database connection.
indices (np.ndarray) – 1D array containing sentence_ids to be considered for precomputed embeddings.
models (list_like) – A list of model names of the embedding models to load.