Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -169,7 +169,7 @@ def find_relevant_theorems(query):
|
|
| 169 |
similarity = util.pytorch_cos_sim(query_embedding, theorem_embedding).item()
|
| 170 |
print(f"Similarity with {theorem['name']}: {similarity}") # Debugging
|
| 171 |
|
| 172 |
-
if similarity > 0.
|
| 173 |
relevant_theorems.append((theorem, similarity))
|
| 174 |
# Sort the theorems by similarity
|
| 175 |
relevant_theorems.sort(key=lambda x: x[1], reverse=True)
|
|
|
|
| 169 |
similarity = util.pytorch_cos_sim(query_embedding, theorem_embedding).item()
|
| 170 |
print(f"Similarity with {theorem['name']}: {similarity}") # Debugging
|
| 171 |
|
| 172 |
+
if similarity > 0.4: # A threshold to consider multiple relevant theorems
|
| 173 |
relevant_theorems.append((theorem, similarity))
|
| 174 |
# Sort the theorems by similarity
|
| 175 |
relevant_theorems.sort(key=lambda x: x[1], reverse=True)
|