Annikaijak commited on
Commit
568f85c
·
verified ·
1 Parent(s): b37d5ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -88,18 +88,18 @@ with tab1:
88
  return value
89
 
90
  building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
91
- building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(add_small_value_if_zero)
92
 
93
  st.dataframe(building_mag_prediction_data)
94
 
95
  # Making the predictions and getting the latest data
96
- building_mag_most_recent_prediction = building_new[['x', 'y', 'z', 'temperature', 'et0_fao_evapotranspiration']]
97
  building_mag_most_recent_prediction_mag = building_mag_hist_model.predict(building_mag_most_recent_prediction)
98
- building_new['Status'] = building_mag_most_recent_prediction
99
- building_new['Status'].replace(['detection', 'no_detection'], ['Vehicle detected', 'No vehicle detected'], inplace=True)
100
- building_new = building_new.rename(columns={'time': 'Time'})
101
- building_new = building_new.set_index(['Time'])
102
- st.dataframe(building_new[['Status']].tail(3))
103
 
104
 
105
  with col2:
 
88
  return value
89
 
90
  building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
91
+ #building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(add_small_value_if_zero)
92
 
93
  st.dataframe(building_mag_prediction_data)
94
 
95
  # Making the predictions and getting the latest data
96
+ building_mag_most_recent_prediction = building_mag_prediction_data[['x', 'y', 'z', 'temperature', 'et0_fao_evapotranspiration']]
97
  building_mag_most_recent_prediction_mag = building_mag_hist_model.predict(building_mag_most_recent_prediction)
98
+ building_mag_prediction_data['Status'] = building_mag_most_recent_prediction
99
+ building_mag_prediction_data['Status'].replace(['detection', 'no_detection'], ['Vehicle detected', 'No vehicle detected'], inplace=True)
100
+ building_mag_prediction_data = building_mag_prediction_data.rename(columns={'time': 'Time'})
101
+ building_mag_prediction_data = building_mag_prediction_data.set_index(['Time'])
102
+ st.dataframe(building_mag_prediction_data[['Status']].tail(3))
103
 
104
 
105
  with col2: