Update recommender/graph_retrieval_vectordb.py
Browse files
recommender/graph_retrieval_vectordb.py
CHANGED
|
@@ -198,7 +198,7 @@ class Neo4jConnectionError(Exception):
|
|
| 198 |
pass
|
| 199 |
|
| 200 |
def run_cypher_query(user_query, query, use_eligibility, user_income, user_cibil, user_age,
|
| 201 |
-
min_joining_fee, max_joining_fee, min_annual_fee, max_annual_fee):
|
| 202 |
|
| 203 |
try:
|
| 204 |
with get_driver().session() as session:
|
|
@@ -209,7 +209,7 @@ def run_cypher_query(user_query, query, use_eligibility, user_income, user_cibil
|
|
| 209 |
|
| 210 |
except Exception as e:
|
| 211 |
raise Neo4jConnectionError("Failed to connect to the Neo4j database.") from e
|
| 212 |
-
|
| 213 |
if use_eligibility:
|
| 214 |
filtered_cards = eligibility_filter(filtered_cards, user_income, user_cibil, user_age,
|
| 215 |
min_joining_fee, max_joining_fee,
|
|
|
|
| 198 |
pass
|
| 199 |
|
| 200 |
def run_cypher_query(user_query, query, use_eligibility, user_income, user_cibil, user_age,
|
| 201 |
+
min_joining_fee, max_joining_fee, min_annual_fee, max_annual_fee, excluded_cards):
|
| 202 |
|
| 203 |
try:
|
| 204 |
with get_driver().session() as session:
|
|
|
|
| 209 |
|
| 210 |
except Exception as e:
|
| 211 |
raise Neo4jConnectionError("Failed to connect to the Neo4j database.") from e
|
| 212 |
+
filtered_cards = [card for card in filtered_cards if card not in excluded_cards]
|
| 213 |
if use_eligibility:
|
| 214 |
filtered_cards = eligibility_filter(filtered_cards, user_income, user_cibil, user_age,
|
| 215 |
min_joining_fee, max_joining_fee,
|