mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge pull request #826 from Hestia-Homes/feautre/calico_example
ignore if score is 0
This commit is contained in:
commit
cab0dec440
1 changed files with 3 additions and 7 deletions
|
|
@ -60,13 +60,6 @@ def check_if_post_code_exists_in_db_cache(postcode):
|
|||
return os_places_results_to_dataframe(response["data"])
|
||||
|
||||
|
||||
def get_ordance_survey_record(row, cache=None):
|
||||
if cache is None:
|
||||
cache = check_if_post_code_exists_in_db_cache(postcode)
|
||||
|
||||
# process cache with row
|
||||
|
||||
|
||||
def save_results_to_s3(
|
||||
results_df: pd.DataFrame,
|
||||
task_id: str,
|
||||
|
|
@ -211,6 +204,9 @@ def handler(body: dict[str, Any], context: Any, local: bool = False) -> None:
|
|||
best_idx = scores.idxmax()
|
||||
best_score = scores[best_idx]
|
||||
|
||||
if best_score <= 0:
|
||||
continue
|
||||
|
||||
df.at[idx, "ordnance_survey_address"] = postcode_cache.at[
|
||||
best_idx, "ADDRESS"
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue