fschwartzer commited on
Commit
efb0d40
1 Parent(s): 34391be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -252,7 +252,11 @@ predicted_target = knn_predict(filtered_data, 'target_column', ['latitude', 'lon
252
  # Add predicted target values to filtered_data
253
  filtered_data['Predicted_target'] = predicted_target
254
 
255
- # Display the map and filtered_data
 
 
 
 
256
  with st.container():
257
  st.map(filtered_data, zoom=zoom_level, use_container_width=True)
258
  st.write("Dados:", filtered_data) # Debug: Print filtered_data
 
252
  # Add predicted target values to filtered_data
253
  filtered_data['Predicted_target'] = predicted_target
254
 
255
+ if st.button("Download Filtered Data as XLSX"):
256
+ with st.spinner('Downloading...'):
257
+ filtered_data.to_excel("filtered_data.xlsx", index=False)
258
+ st.success('Download Complete!')
259
+
260
  with st.container():
261
  st.map(filtered_data, zoom=zoom_level, use_container_width=True)
262
  st.write("Dados:", filtered_data) # Debug: Print filtered_data