Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update appStore/filter_utils.py
Browse filesfix arg and return in get_crs_options
- appStore/filter_utils.py +9 -3
appStore/filter_utils.py
CHANGED
@@ -96,10 +96,16 @@ def filter_results(results, country_filter, region_filter, end_year_range, crs_f
|
|
96 |
return filtered
|
97 |
|
98 |
@st.cache_data(show_spinner=False)
|
99 |
-
def get_crs_options(_client, collection_name):
|
100 |
"""
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
"""
|
104 |
results = hybrid_search(_client, "", collection_name)
|
105 |
all_results = results[0] + results[1]
|
|
|
96 |
return filtered
|
97 |
|
98 |
@st.cache_data(show_spinner=False)
|
99 |
+
def get_crs_options(_client, collection_name: str) -> List[str]:
|
100 |
"""
|
101 |
+
Returns a sorted list of all CRS code+description combos found in the collection.
|
102 |
+
|
103 |
+
Args:
|
104 |
+
_client: The client object used to query the collection (likely a vector DB client).
|
105 |
+
collection_name (str): Name of the collection to search in.
|
106 |
+
|
107 |
+
Returns:
|
108 |
+
List[str]: A sorted list of strings in the format "<crs_key>: <description>".
|
109 |
"""
|
110 |
results = hybrid_search(_client, "", collection_name)
|
111 |
all_results = results[0] + results[1]
|