Skip to content

Commit 25e8d81

Browse files
committed
feat: minor changes of normalize embeddings console prompt
1 parent f64c2c5 commit 25e8d81

File tree

1 file changed

+3
-2
lines changed
  • open/text/embeddings/server

1 file changed

+3
-2
lines changed

open/text/embeddings/server/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ def initialize_embeddings():
8484

8585
model_name = os.environ["MODEL"]
8686
print("Loading model:", model_name)
87+
normalize_embeddings = bool(os.environ.get("NORMALIZE_EMBEDDINGS", ""))
8788
encode_kwargs = {
88-
"normalize_embeddings": bool(os.environ.get("NORMALIZE_EMBEDDINGS", ""))
89+
"normalize_embeddings": normalize_embeddings
8990
}
90-
print("encode_kwargs", encode_kwargs)
91+
print("Normalize embeddings:", normalize_embeddings)
9192
if "e5" in model_name:
9293
embeddings = HuggingFaceInstructEmbeddings(model_name=model_name,
9394
embed_instruction=E5_EMBED_INSTRUCTION,

0 commit comments

Comments
 (0)