Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def reply(input, dataset_name):
|
|
60 |
input = input
|
61 |
input_vector = generate_embeddings(input, model_id,hf_token)
|
62 |
df["similarities"]=df["embedding"].apply(lambda x: cosine_similarity([x],[input_vector])[0][0])
|
63 |
-
data = df.sort_values("similarities", ascending=False).head(
|
64 |
data.to_csv("sorted.csv")
|
65 |
context = []
|
66 |
for i, row in data.iterrows():
|
|
|
60 |
input = input
|
61 |
input_vector = generate_embeddings(input, model_id,hf_token)
|
62 |
df["similarities"]=df["embedding"].apply(lambda x: cosine_similarity([x],[input_vector])[0][0])
|
63 |
+
data = df.sort_values("similarities", ascending=False).head(5)
|
64 |
data.to_csv("sorted.csv")
|
65 |
context = []
|
66 |
for i, row in data.iterrows():
|