diff --git a/backend/address2UPRN/main.py b/backend/address2UPRN/main.py index c51171e5..6ca2fd5c 100644 --- a/backend/address2UPRN/main.py +++ b/backend/address2UPRN/main.py @@ -3,7 +3,6 @@ import os from urllib.parse import urlencode import pandas as pd from difflib import SequenceMatcher -from tqdm import tqdm from utils.logger import setup_logger import re from typing import Set @@ -334,22 +333,10 @@ def get_uprn_candidates( def get_uprn_with_epc_df( user_inputed_address: str, epc_df: pd.DataFrame, - verbose=False, ): """ Return uprn (str) using a pre-fetched EPC dataframe. This avoids calling the API multiple times for the same postcode. - - Args: - user_inputed_address: The user's address string - epc_df: Pre-fetched EPC data for the postcode - return_address: Whether to return the matched address - return_EPC: Whether to return the EPC rating - return_score: Whether to return the lexiscore - - Returns: - uprn (str), or tuple if return_address/return_EPC/return_score are True - Returns None if no match found, lexiscore < 0.7, or UPRN is empty """ if epc_df.empty: return None