Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
80eb9a3
1
Parent(s):
0697975
Update app.py
Browse files
app.py
CHANGED
@@ -55,14 +55,16 @@ with st.sidebar:
|
|
55 |
if selected_coords == 'Custom':
|
56 |
custom_lat = st.number_input('Enter Latitude', value=-29.45086)
|
57 |
custom_lon = st.number_input('Enter Longitude', value=-51.9847)
|
|
|
58 |
else:
|
59 |
custom_lat, custom_lon = data['latitude'].mean(), data['longitude'].mean()
|
|
|
60 |
|
61 |
# Slider for setting the zoom level
|
62 |
zoom_level = st.slider('Nível de zoom', min_value=1, max_value=15, value=zoom_level)
|
63 |
|
64 |
-
# Slider to set the radius in meters
|
65 |
-
radius_in_meters = st.slider('Selecione raio (em metros)', min_value=100, max_value=5000, value=1000)
|
66 |
|
67 |
# Filter data based on the radius
|
68 |
if selected_coords == 'Custom':
|
|
|
55 |
if selected_coords == 'Custom':
|
56 |
custom_lat = st.number_input('Enter Latitude', value=-29.45086)
|
57 |
custom_lon = st.number_input('Enter Longitude', value=-51.9847)
|
58 |
+
radius_visible = True # Show radius slider for custom coordinates
|
59 |
else:
|
60 |
custom_lat, custom_lon = data['latitude'].mean(), data['longitude'].mean()
|
61 |
+
radius_visible = False # Hide radius slider for random coordinates
|
62 |
|
63 |
# Slider for setting the zoom level
|
64 |
zoom_level = st.slider('Nível de zoom', min_value=1, max_value=15, value=zoom_level)
|
65 |
|
66 |
+
# Slider to set the radius in meters (conditionally visible)
|
67 |
+
radius_in_meters = st.slider('Selecione raio (em metros)', min_value=100, max_value=5000, value=1000, visible=radius_visible)
|
68 |
|
69 |
# Filter data based on the radius
|
70 |
if selected_coords == 'Custom':
|