Spaces:
Sleeping
Sleeping
alonsosilva
commited on
Commit
•
de81f6b
1
Parent(s):
c2318c3
Add k=limit to query
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def Display_Full(query,db,limit):
|
|
24 |
rowid,
|
25 |
distance
|
26 |
FROM vec_sents
|
27 |
-
WHERE embedding MATCH ?
|
28 |
ORDER BY distance
|
29 |
LIMIT {limit}
|
30 |
""",
|
@@ -44,7 +44,7 @@ def Display_Binary(query,db,limit):
|
|
44 |
rowid,
|
45 |
distance
|
46 |
FROM bin_vec_sents
|
47 |
-
WHERE embedding MATCH vec_quantize_binary(?)
|
48 |
ORDER BY distance
|
49 |
LIMIT {limit}
|
50 |
""",
|
|
|
24 |
rowid,
|
25 |
distance
|
26 |
FROM vec_sents
|
27 |
+
WHERE embedding MATCH ? AND k={limit}
|
28 |
ORDER BY distance
|
29 |
LIMIT {limit}
|
30 |
""",
|
|
|
44 |
rowid,
|
45 |
distance
|
46 |
FROM bin_vec_sents
|
47 |
+
WHERE embedding MATCH vec_quantize_binary(?) AND k={limit}
|
48 |
ORDER BY distance
|
49 |
LIMIT {limit}
|
50 |
""",
|