Disabled semantic search and reranker by default
This commit is contained in:
parent
57a79e5e8e
commit
c844e2c81e
3 changed files with 18 additions and 5 deletions
4
app.py
4
app.py
|
|
@ -139,14 +139,14 @@ def ensure_rns_config(config_dir, transport_host=None, transport_port=None):
|
|||
|
||||
def _preload_embeddings():
|
||||
"""Pre-load the embedding model and build the HNSW index in background."""
|
||||
if get_setting("semantic_search", "1") != "1":
|
||||
if get_setting("semantic_search", "0") != "1":
|
||||
print("Semantic search disabled.")
|
||||
return
|
||||
try:
|
||||
from embeddings import _get_session, _get_reranker, build_index
|
||||
_get_session()
|
||||
build_index()
|
||||
if get_setting("use_reranker", "1") == "1":
|
||||
if get_setting("use_reranker", "0") == "1":
|
||||
_get_reranker()
|
||||
print("Semantic search ready (with reranker).")
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue