Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
ajl2718 commited on
Commit ·
b71a362
1
Parent(s): 67a3177
More detailed comments
Browse files
app.py
CHANGED
|
@@ -9,7 +9,10 @@ download('au_vic_lg', 'saunteringcat/whereabouts-db')
|
|
| 9 |
download('au_nsw_lg', 'saunteringcat/whereabouts-db')
|
| 10 |
|
| 11 |
# create a matcher object
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# function to geocode results
|
| 15 |
def geocode(addresses):
|
|
@@ -24,7 +27,19 @@ interface_geocoder = gr.Interface(
|
|
| 24 |
inputs=[text_input],
|
| 25 |
outputs=[json_output],
|
| 26 |
title="Geocode addresses using whereabouts",
|
| 27 |
-
description="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
)
|
| 29 |
|
| 30 |
demo = gr.TabbedInterface([interface_geocoder], ["Geocoding"])
|
|
|
|
| 9 |
download('au_nsw_lg', 'saunteringcat/whereabouts-db')
|
| 10 |
|
| 11 |
# create a matcher object
|
| 12 |
+
matcher1 = Matcher('au_all_sm')
|
| 13 |
+
matcher2 = Matcher('au_all_lg')
|
| 14 |
+
matcher3 = Matcher('au_vic_lg')
|
| 15 |
+
matcher4 = Matcher('au_all_sm')
|
| 16 |
|
| 17 |
# function to geocode results
|
| 18 |
def geocode(addresses):
|
|
|
|
| 27 |
inputs=[text_input],
|
| 28 |
outputs=[json_output],
|
| 29 |
title="Geocode addresses using whereabouts",
|
| 30 |
+
description="""
|
| 31 |
+
Whereabouts is a freely available open-source geocoding package for Python. Currently it supports geocoding of Australian addresses, with more countries being added.
|
| 32 |
+
This demo shows whereabouts in action.
|
| 33 |
+
|
| 34 |
+
The code is available on github:
|
| 35 |
+
https://www.github.com/ajl2718/whereabouts
|
| 36 |
+
|
| 37 |
+
Or you can install it using as follows
|
| 38 |
+
```
|
| 39 |
+
pip install whereabouts
|
| 40 |
+
python -m whereabouts download au_all_sm
|
| 41 |
+
```
|
| 42 |
+
"""
|
| 43 |
)
|
| 44 |
|
| 45 |
demo = gr.TabbedInterface([interface_geocoder], ["Geocoding"])
|