From b0e5e278a18e5c4755adf9a71f0a364f3580bccb Mon Sep 17 00:00:00 2001 From: Coding with Peter Date: Tue, 18 Apr 2023 19:58:35 -0700 Subject: [PATCH] content --- content.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content.py b/content.py index 6bc1972..1eee614 100644 --- a/content.py +++ b/content.py @@ -1058,6 +1058,8 @@ def search_embeddings(): # Sort the sentences by their cosine similarity to the query sentence results = sorted(zip(sentences, cosine_scores, files), key=lambda x: x[1], reverse=True) + print(results[:5]) + # Print the top 5 results for i, (sentence, score, file) in enumerate(results[:5]): print(f'Top {i+1}: {file} - {sentence} - (Score: {score})')