Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
ba96f19
1
Parent(s):
525f2c4
Update app.py
Browse files
app.py
CHANGED
@@ -80,11 +80,11 @@ with st.sidebar:
|
|
80 |
selected_coords = st.selectbox('Selecione Coordenadas', ['Random', 'Custom'])
|
81 |
|
82 |
if selected_coords == 'Custom':
|
83 |
-
custom_address = st.text_input('
|
84 |
radius_visible = True # Show radius slider for custom coordinates
|
85 |
# No need to initialize max_distance_all here
|
86 |
else:
|
87 |
-
custom_address = "
|
88 |
radius_visible = False # Hide radius slider for random coordinates
|
89 |
max_distance_all = 0 # Initialize max_distance_all here
|
90 |
|
@@ -97,7 +97,7 @@ with st.sidebar:
|
|
97 |
location = gmaps.geocode(custom_address)[0]['geometry']['location']
|
98 |
custom_lat, custom_lon = location['lat'], location['lng']
|
99 |
except (IndexError, GeocoderTimedOut):
|
100 |
-
st.error("
|
101 |
|
102 |
# Slider for setting the zoom level
|
103 |
if selected_coords == 'Custom':
|
|
|
80 |
selected_coords = st.selectbox('Selecione Coordenadas', ['Random', 'Custom'])
|
81 |
|
82 |
if selected_coords == 'Custom':
|
83 |
+
custom_address = st.text_input('Informe o endereço', 'Endereço desejado aqui')
|
84 |
radius_visible = True # Show radius slider for custom coordinates
|
85 |
# No need to initialize max_distance_all here
|
86 |
else:
|
87 |
+
custom_address = "Lajeado, Rio Grande do Sul, Brazil" # Default address
|
88 |
radius_visible = False # Hide radius slider for random coordinates
|
89 |
max_distance_all = 0 # Initialize max_distance_all here
|
90 |
|
|
|
97 |
location = gmaps.geocode(custom_address)[0]['geometry']['location']
|
98 |
custom_lat, custom_lon = location['lat'], location['lng']
|
99 |
except (IndexError, GeocoderTimedOut):
|
100 |
+
st.error("Erro: Não foi possível geocodificar o endereço fornecido. Por favor, verifique e tente novamente.")
|
101 |
|
102 |
# Slider for setting the zoom level
|
103 |
if selected_coords == 'Custom':
|