Spaces:
Runtime error
Runtime error
bourdoiscatie
commited on
Commit
•
0452c49
1
Parent(s):
9f079c2
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ model = SentenceTransformer("OrdalieTech/Solon-embeddings-large-0.1")
|
|
22 |
def search(query, top_k: int = 20, rescore_multiplier: int = 1, use_approx: bool = False):
|
23 |
# 1. Embed the query as float32
|
24 |
start_time = time.time()
|
25 |
-
query_embedding = model.encode(query)
|
26 |
embed_time = time.time() - start_time
|
27 |
|
28 |
# 2. Quantize the query to ubinary
|
|
|
22 |
def search(query, top_k: int = 20, rescore_multiplier: int = 1, use_approx: bool = False):
|
23 |
# 1. Embed the query as float32
|
24 |
start_time = time.time()
|
25 |
+
query_embedding = model.encode(query, prompt="query: ")
|
26 |
embed_time = time.time() - start_time
|
27 |
|
28 |
# 2. Quantize the query to ubinary
|