Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def get_code(query):
|
|
36 |
truncate="LEFT").embeddings
|
37 |
|
38 |
# Retrieve the nearest neighbors
|
39 |
-
similar_item_ids = search_index.get_nns_by_vector(query_embed[0],
|
40 |
|
41 |
|
42 |
return data_df.iloc[similar_item_ids[0]]['function_body'], data_df.iloc[similar_item_ids[0]]['file_path']
|
|
|
36 |
truncate="LEFT").embeddings
|
37 |
|
38 |
# Retrieve the nearest neighbors
|
39 |
+
similar_item_ids = search_index.get_nns_by_vector(query_embed[0],3)
|
40 |
|
41 |
|
42 |
return data_df.iloc[similar_item_ids[0]]['function_body'], data_df.iloc[similar_item_ids[0]]['file_path']
|