refac
This commit is contained in:
parent
6d343e52e7
commit
2e94bda7fa
1 changed files with 2 additions and 2 deletions
|
|
@ -17,9 +17,9 @@ def inference(image_path):
|
|||
return output, predictions
|
||||
|
||||
|
||||
def extract_total_sqm(deplot_input_str):
|
||||
def extract_total_sqm(input_str: str):
|
||||
sqmregex = r"(\d+\.\d*) ?(sq ?m|sq. ?m)"
|
||||
matches = re.findall(sqmregex, deplot_input_str.lower())
|
||||
matches = re.findall(sqmregex, input_str.lower())
|
||||
if len(matches) == 0:
|
||||
return None
|
||||
sqms = [float(m[0]) for m in matches]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue