Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
·
6c5251f
1
Parent(s):
26eca56
Update app.py
Browse files
app.py
CHANGED
@@ -233,33 +233,8 @@ predicted_target = knn_predict(filtered_data, 'target_column', ['latitude', 'lon
|
|
233 |
filtered_data['Predicted_target'] = predicted_target
|
234 |
|
235 |
# Display the map and filtered_data
|
236 |
-
with st.container():
|
237 |
-
|
238 |
-
|
239 |
-
# Create a folium map centered around the custom location with dark mode style
|
240 |
-
map_custom = folium.Map(data=filtered_data, location=[custom_lat, custom_lon], zoom_start=zoom_level, control_scale=True)
|
241 |
-
folium.TileLayer('cartodbdark_matter', control=False).add_to(map_custom)
|
242 |
-
|
243 |
-
# Add a blue marker for the geocoded address
|
244 |
-
folium.Marker([custom_lat, custom_lon], tooltip='Local pesquisado', icon=folium.Icon(color='blue')).add_to(map_custom)
|
245 |
-
|
246 |
-
# Display the folium map using streamlit_folium
|
247 |
-
folium_static(map_custom)
|
248 |
-
|
249 |
-
# Apply custom CSS to extend the map to all available space
|
250 |
-
st.markdown(
|
251 |
-
"""
|
252 |
-
<style>
|
253 |
-
.stFoliumMap {
|
254 |
-
width: 150%;
|
255 |
-
height: 150vh;
|
256 |
-
}
|
257 |
-
</style>
|
258 |
-
""",
|
259 |
-
unsafe_allow_html=True
|
260 |
-
)
|
261 |
-
|
262 |
-
|
263 |
st.write("Dados:", filtered_data) # Debug: Print filtered_data
|
264 |
|
265 |
k_threshold = 5
|
|
|
233 |
filtered_data['Predicted_target'] = predicted_target
|
234 |
|
235 |
# Display the map and filtered_data
|
236 |
+
with st.container(width=1.0):
|
237 |
+
st.map(filtered_data, zoom=zoom_level, use_container_width=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
st.write("Dados:", filtered_data) # Debug: Print filtered_data
|
239 |
|
240 |
k_threshold = 5
|