Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 =
|
| 97 |
building_mag_most_recent_prediction_mag = building_mag_hist_model.predict(building_mag_most_recent_prediction)
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
st.dataframe(
|
| 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:
|