Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -293,13 +293,20 @@ def extract_addresses(response):
|
|
293 |
if not isinstance(response, str):
|
294 |
response = str(response)
|
295 |
address_patterns = [
|
296 |
-
r'([A-Z].*,\sOmaha,\sNE\s\d{5})',
|
297 |
-
r'(\d{4}\s.*,\sOmaha,\sNE\s\d{5})',
|
298 |
-
r'([A-Z].*,\sNE\s\d{5})',
|
299 |
-
r'([A-Z].*,.*\sSt,\sOmaha,\sNE\s\d{5})',
|
300 |
-
r'([A-Z].*,.*\sStreets,\sOmaha,\sNE\s\d{5})',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
r'(\d{2}.*\sStreets)',
|
302 |
-
r'([A-Z].*\s\d{2},\
|
303 |
]
|
304 |
addresses = []
|
305 |
for pattern in address_patterns:
|
|
|
293 |
if not isinstance(response, str):
|
294 |
response = str(response)
|
295 |
address_patterns = [
|
296 |
+
# r'([A-Z].*,\sOmaha,\sNE\s\d{5})',
|
297 |
+
# r'(\d{4}\s.*,\sOmaha,\sNE\s\d{5})',
|
298 |
+
# r'([A-Z].*,\sNE\s\d{5})',
|
299 |
+
# r'([A-Z].*,.*\sSt,\sOmaha,\sNE\s\d{5})',
|
300 |
+
# r'([A-Z].*,.*\sStreets,\sOmaha,\sNE\s\d{5})',
|
301 |
+
# r'(\d{2}.*\sStreets)',
|
302 |
+
# r'([A-Z].*\s\d{2},\sOmaha,\sNE\s\d{5})'
|
303 |
+
r'([A-Z].*,\sBirmingham,\sAL\s\d{5})',
|
304 |
+
r'(\d{4}\s.*,\sBirmingham,\sAL\s\d{5})',
|
305 |
+
r'([A-Z].*,\sAL\s\d{5})',
|
306 |
+
r'([A-Z].*,.*\sSt,\sBirmingham,\sAL\s\d{5})',
|
307 |
+
r'([A-Z].*,.*\sStreets,\sBirmingham,\sAL\s\d{5})',
|
308 |
r'(\d{2}.*\sStreets)',
|
309 |
+
r'([A-Z].*\s\d{2},\sBirmingham,\sAL\s\d{5})'
|
310 |
]
|
311 |
addresses = []
|
312 |
for pattern in address_patterns:
|