Spaces:
Runtime error
Runtime error
Commit
•
942976d
1
Parent(s):
6d7d107
changes
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ import pandas as pd
|
|
19 |
from sentence_transformers import SentenceTransformer
|
20 |
|
21 |
#prepare model
|
22 |
-
nbrs = NearestNeighbors(n_neighbors=
|
23 |
|
24 |
def search(query):
|
25 |
product = model.encode(query).tolist()
|
|
|
19 |
from sentence_transformers import SentenceTransformer
|
20 |
|
21 |
#prepare model
|
22 |
+
nbrs = NearestNeighbors(n_neighbors=20, algorithm='ball_tree').fit(df_knn)
|
23 |
|
24 |
def search(query):
|
25 |
product = model.encode(query).tolist()
|