Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,13 +86,13 @@ with tab1:
|
|
| 86 |
st.dataframe(building_mag_prediction_data)
|
| 87 |
|
| 88 |
# Making the predictions and getting the latest data
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
|
| 97 |
|
| 98 |
with col2:
|
|
|
|
| 86 |
st.dataframe(building_mag_prediction_data)
|
| 87 |
|
| 88 |
# Making the predictions and getting the latest data
|
| 89 |
+
building_mag_most_recent_prediction = building_new[['x', 'y', 'z', 'temperature', 'et0_fao_evapotranspiration']]
|
| 90 |
+
building_mag_most_recent_prediction_mag = building_mag_hist_model.predict(building_mag_most_recent_prediction)
|
| 91 |
+
building_new['Status'] = building_mag_most_recent_prediction
|
| 92 |
+
building_new['Status'].replace(['detection', 'no_detection'], ['Vehicle detected', 'No vehicle detected'], inplace=True)
|
| 93 |
+
building_new = building_new.rename(columns={'time': 'Time'})
|
| 94 |
+
building_new = building_new.set_index(['Time'])
|
| 95 |
+
st.dataframe(building_new[['Status']].tail(3))
|
| 96 |
|
| 97 |
|
| 98 |
with col2:
|