Update app.py
Browse files
app.py
CHANGED
@@ -273,7 +273,7 @@ def search_embeddings(chunks, embedding_model, vector_store_type, search_type, q
|
|
273 |
def calculate_statistics(results, search_time, vector_store, num_tokens, embedding_model, query, top_k):
|
274 |
stats = {
|
275 |
"num_results": len(results),
|
276 |
-
|
277 |
|
278 |
# "avg_content_length": np.mean([len(doc.page_content) for doc in results]) if not results.empty else 0,
|
279 |
"search_time": search_time,
|
|
|
273 |
def calculate_statistics(results, search_time, vector_store, num_tokens, embedding_model, query, top_k):
|
274 |
stats = {
|
275 |
"num_results": len(results),
|
276 |
+
# "avg_content_length": sum(len(doc.page_content) for doc in results) / len(results) if results else 0,
|
277 |
|
278 |
# "avg_content_length": np.mean([len(doc.page_content) for doc in results]) if not results.empty else 0,
|
279 |
"search_time": search_time,
|