From a2b77fd0729bed05b4ce1c744f26b23ffae55679 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 19 Sep 2024 18:08:52 +0200 Subject: [PATCH] refac --- backend/open_webui/apps/rag/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/apps/rag/main.py b/backend/open_webui/apps/rag/main.py index 932c3f72c..3e6761f06 100644 --- a/backend/open_webui/apps/rag/main.py +++ b/backend/open_webui/apps/rag/main.py @@ -203,6 +203,7 @@ def update_reranking_model( class ColBERT: def __init__(self, name) -> None: + print("ColBERT: Loading model", name) self.device = "cuda" if torch.cuda.is_available() else "cpu" self.ckpt = Checkpoint( name, @@ -266,9 +267,7 @@ def update_reranking_model( return scores try: - app.state.sentence_transformer_rf = ColBERT( - get_model_path(reranking_model, auto_update) - ) + app.state.sentence_transformer_rf = ColBERT(reranking_model) except Exception as e: log.error(f"ColBERT: {e}") app.state.sentence_transformer_rf = None