fschwartzer commited on
Commit
0db29ce
1 Parent(s): 1d5c8f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -297,15 +297,17 @@ if 'Predicted_target' in filtered_data.columns and not np.all(predicted_target =
297
  else:
298
  st.warning(f"**Dados insuficientes para inferência do valor. Mínimo necessário:** {k_threshold}")
299
 
300
- folium_map = folium.Map(location=[custom_lat, custom_lon], zoom_start=zoom_level, control_scale=True)
 
 
301
 
302
- # Add heatmap layers for 'Valor_Urb', 'Valor_Eqp', and 'RENDA'
303
- add_heatmap_layer(folium_map, filtered_data, 'Valor_Urb', 'RdBu_r')
304
- add_heatmap_layer(folium_map, filtered_data, 'Valor_Eqp', 'RdBu_r')
305
- add_heatmap_layer(folium_map, filtered_data, 'RENDA', 'RdBu_r')
306
 
307
- # Add layer control
308
- folium.LayerControl().add_to(folium_map)
309
 
310
- # Display the map using st_folium
311
- st_folium(folium_map, width="100%", height="100%")
 
297
  else:
298
  st.warning(f"**Dados insuficientes para inferência do valor. Mínimo necessário:** {k_threshold}")
299
 
300
+ # Display the map for features
301
+ with st.container():
302
+ folium_layermap = folium.Map(location=[custom_lat, custom_lon], zoom_start=zoom_level, control_scale=True)
303
 
304
+ # Add heatmap layers for 'Valor_Urb', 'Valor_Eqp', and 'RENDA'
305
+ add_heatmap_layer(folium_layermap, filtered_data, 'Valor_Urb', 'RdBu_r')
306
+ add_heatmap_layer(folium_layermap, filtered_data, 'Valor_Eqp', 'RdBu_r')
307
+ add_heatmap_layer(folium_layermap, filtered_data, 'RENDA', 'RdBu_r')
308
 
309
+ # Add layer control
310
+ folium.LayerControl().add_to(folium_map)
311
 
312
+ # Display the map using st_folium
313
+ st_folium(folium_layermap, width="100%", height="100%")