fschwartzer commited on
Commit
9c4dcb3
·
1 Parent(s): 38a9e29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -198,12 +198,12 @@ st.markdown(f"""<style>
198
  </style>""", unsafe_allow_html=True)
199
 
200
  # Determine which area feature to use for prediction
201
- area_feature = np.where(filtered_data['Apriv'] != 0, 'Apriv', 'Atotal')
202
 
203
  # Check if KNN should be applied
204
  if selected_coords == 'Direcionada' and radius_visible:
205
  # Apply KNN and get predicted V_oferta values
206
- predicted_V_oferta = knn_predict(filtered_data, 'V_oferta', ['latitude', 'longitude', area_feature]) # Update with your features
207
  # Add predicted V_oferta values to filtered_data
208
  filtered_data['Predicted_V_oferta'] = predicted_V_oferta
209
 
 
198
  </style>""", unsafe_allow_html=True)
199
 
200
  # Determine which area feature to use for prediction
201
+ filtered_data['area_feature'] = np.where(filtered_data['Apriv'] != 0, filtered_data['Apriv'], filtered_data['Atotal'])
202
 
203
  # Check if KNN should be applied
204
  if selected_coords == 'Direcionada' and radius_visible:
205
  # Apply KNN and get predicted V_oferta values
206
+ predicted_V_oferta = knn_predict(filtered_data, 'V_oferta', ['latitude', 'longitude', 'area_feature']) # Update with your features
207
  # Add predicted V_oferta values to filtered_data
208
  filtered_data['Predicted_V_oferta'] = predicted_V_oferta
209