Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,9 +40,6 @@ with tab1:
|
|
| 40 |
project = hopsworks.login(project = "annikaij", api_key_value=os.environ['HOPSWORKS_API_KEY'])
|
| 41 |
fs = project.get_feature_store()
|
| 42 |
|
| 43 |
-
|
| 44 |
-
st.subheader("Parking place near building:")
|
| 45 |
-
|
| 46 |
# Function to load the building models
|
| 47 |
|
| 48 |
@st.cache_data()
|
|
@@ -78,6 +75,8 @@ with tab1:
|
|
| 78 |
col1, col2 = st.columns(2)
|
| 79 |
|
| 80 |
with col1:
|
|
|
|
|
|
|
| 81 |
# Retrieving building data
|
| 82 |
building_new = retrieve_building()
|
| 83 |
|
|
@@ -93,6 +92,8 @@ with tab1:
|
|
| 93 |
st.dataframe(building_mag_prediction_data[['Status']].tail(3))
|
| 94 |
|
| 95 |
with col2:
|
|
|
|
|
|
|
| 96 |
# Making the predictions and getting the latest data for radar data
|
| 97 |
building_rad_prediction_data = building_new[['time', 'radar_0', 'radar_1', 'radar_2', 'radar_3', 'radar_4', 'radar_5', 'radar_6', 'radar_7', 'temperature', 'et0_fao_evapotranspiration']]
|
| 98 |
building_rad_prediction_data['et0_fao_evapotranspiration'] = building_rad_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
|
@@ -112,7 +113,6 @@ with tab1:
|
|
| 112 |
st.experimental_rerun()
|
| 113 |
|
| 114 |
with tab2:
|
| 115 |
-
st.subheader("Parking place near bikelane:")
|
| 116 |
|
| 117 |
# Function to load the bikelane models
|
| 118 |
|
|
@@ -152,6 +152,7 @@ with tab2:
|
|
| 152 |
col1, col2 = st.columns(2)
|
| 153 |
|
| 154 |
with col1:
|
|
|
|
| 155 |
# Making the predictions and getting the latest data for magnetic field data
|
| 156 |
bikelane_mag_prediction_data = bikelane_new[['time', 'x', 'y', 'z', 'temperature', 'et0_fao_evapotranspiration']]
|
| 157 |
bikelane_mag_prediction_data['et0_fao_evapotranspiration'] = bikelane_mag_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
|
@@ -163,7 +164,8 @@ with tab2:
|
|
| 163 |
bikelane_mag_prediction_data = bikelane_mag_prediction_data.set_index(['Time'])
|
| 164 |
st.dataframe(bikelane_mag_prediction_data[['Status']].tail(3))
|
| 165 |
|
| 166 |
-
with col2:
|
|
|
|
| 167 |
# Making the predictions and getting the latest data for radar data
|
| 168 |
bikelane_rad_prediction_data = bikelane_new[['time', 'radar_0', 'radar_1', 'radar_2', 'radar_3', 'radar_4', 'radar_5', 'radar_6', 'radar_7', 'temperature', 'et0_fao_evapotranspiration']]
|
| 169 |
bikelane_rad_prediction_data['et0_fao_evapotranspiration'] = bikelane_rad_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
|
|
|
| 40 |
project = hopsworks.login(project = "annikaij", api_key_value=os.environ['HOPSWORKS_API_KEY'])
|
| 41 |
fs = project.get_feature_store()
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
# Function to load the building models
|
| 44 |
|
| 45 |
@st.cache_data()
|
|
|
|
| 75 |
col1, col2 = st.columns(2)
|
| 76 |
|
| 77 |
with col1:
|
| 78 |
+
st.subheader("Prediction from magnetic field data on building:")
|
| 79 |
+
|
| 80 |
# Retrieving building data
|
| 81 |
building_new = retrieve_building()
|
| 82 |
|
|
|
|
| 92 |
st.dataframe(building_mag_prediction_data[['Status']].tail(3))
|
| 93 |
|
| 94 |
with col2:
|
| 95 |
+
st.subheader("Prediction from radar data on building:")
|
| 96 |
+
|
| 97 |
# Making the predictions and getting the latest data for radar data
|
| 98 |
building_rad_prediction_data = building_new[['time', 'radar_0', 'radar_1', 'radar_2', 'radar_3', 'radar_4', 'radar_5', 'radar_6', 'radar_7', 'temperature', 'et0_fao_evapotranspiration']]
|
| 99 |
building_rad_prediction_data['et0_fao_evapotranspiration'] = building_rad_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
|
|
|
| 113 |
st.experimental_rerun()
|
| 114 |
|
| 115 |
with tab2:
|
|
|
|
| 116 |
|
| 117 |
# Function to load the bikelane models
|
| 118 |
|
|
|
|
| 152 |
col1, col2 = st.columns(2)
|
| 153 |
|
| 154 |
with col1:
|
| 155 |
+
st.subheader("Prediction from magnetic field data on bikelane:")
|
| 156 |
# Making the predictions and getting the latest data for magnetic field data
|
| 157 |
bikelane_mag_prediction_data = bikelane_new[['time', 'x', 'y', 'z', 'temperature', 'et0_fao_evapotranspiration']]
|
| 158 |
bikelane_mag_prediction_data['et0_fao_evapotranspiration'] = bikelane_mag_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
|
|
|
| 164 |
bikelane_mag_prediction_data = bikelane_mag_prediction_data.set_index(['Time'])
|
| 165 |
st.dataframe(bikelane_mag_prediction_data[['Status']].tail(3))
|
| 166 |
|
| 167 |
+
with col2:
|
| 168 |
+
st.subheader("Prediction from radar data on bikelane:")
|
| 169 |
# Making the predictions and getting the latest data for radar data
|
| 170 |
bikelane_rad_prediction_data = bikelane_new[['time', 'radar_0', 'radar_1', 'radar_2', 'radar_3', 'radar_4', 'radar_5', 'radar_6', 'radar_7', 'temperature', 'et0_fao_evapotranspiration']]
|
| 171 |
bikelane_rad_prediction_data['et0_fao_evapotranspiration'] = bikelane_rad_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|