Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -475,24 +475,13 @@ def calculate_dot_product_and_representations_independent(query_model_choice, do
|
|
475 |
|
476 |
# Overlapping Terms Dot Products
|
477 |
if sorted_overlapping_dot_products:
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
if query_is_binary and doc_is_binary:
|
487 |
-
overlap_list.append(f"**{term}**: 1.0000 x 1.0000 = {product_val:.4f}")
|
488 |
-
elif query_is_binary:
|
489 |
-
overlap_list.append(f"**{term}**: 1.0000 x {doc_weight:.4f} = {product_val:.4f}")
|
490 |
-
elif doc_is_binary:
|
491 |
-
overlap_list.append(f"**{term}**: {query_weight:.4f} x 1.0000 = {product_val:.4f}")
|
492 |
-
else:
|
493 |
-
overlap_list.append(f"**{term}**: {query_weight:.4f} x {doc_weight:.4f} = {product_val:.4f}")
|
494 |
-
full_output += ", ".join(overlap_list) + ".\n\n"
|
495 |
-
full_output += "---\n\n"
|
496 |
else:
|
497 |
full_output += "### No Overlapping Terms Found.\n\n"
|
498 |
full_output += "---\n\n"
|
|
|
475 |
|
476 |
# Overlapping Terms Dot Products
|
477 |
if sorted_overlapping_dot_products:
|
478 |
+
full_output += "### Dot Products of Overlapping Terms:\n"
|
479 |
+
full_output += "\n" # Removed the individual weight explanation
|
480 |
+
overlap_list = []
|
481 |
+
for term, product_val in sorted_overlapping_dot_products:
|
482 |
+
overlap_list.append(f"**{term}**: {product_val:.4f}") # Simplified to just the dot product
|
483 |
+
full_output += ", ".join(overlap_list) + ".\n\n"
|
484 |
+
full_output += "---\n\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
else:
|
486 |
full_output += "### No Overlapping Terms Found.\n\n"
|
487 |
full_output += "---\n\n"
|