Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,8 +61,7 @@ with tab1:
|
|
| 61 |
@st.cache_data()
|
| 62 |
def retrieve_building(feature_group=api_building_newest_fg):
|
| 63 |
api_building_newest_fg = feature_group.select(["time", "x", "y", "z"])
|
| 64 |
-
df_building = api_building_newest_fg.read(read_options={"use_hive": True})
|
| 65 |
-
df_building = pd.DataFrame(data=df_building)
|
| 66 |
return df_building
|
| 67 |
|
| 68 |
# Retrieving building data
|
|
@@ -72,7 +71,7 @@ with tab1:
|
|
| 72 |
building_most_recent_prediction = building_hist_model.predict(building_most_recent_prediction)
|
| 73 |
building_new['prediction'] = building_most_recent_prediction
|
| 74 |
building_new = building_new.set_index(['time'])
|
| 75 |
-
st.dataframe(building_new[['prediction']].tail(5)
|
| 76 |
|
| 77 |
with col2:
|
| 78 |
st.markdown("Parking place near bikelane:")
|
|
@@ -96,7 +95,6 @@ with tab1:
|
|
| 96 |
def retrieve_bikelane(feature_group=api_bikelane_newest_fg):
|
| 97 |
api_bikelane_newest_fg = feature_group.select(["time", "x", "y", "z"])
|
| 98 |
df_bikelane = api_bikelane_newest_fg.read(read_options={"use_hive": True})
|
| 99 |
-
df_bikelane = pd.DataFrame(data=df_bikelane)
|
| 100 |
return df_bikelane
|
| 101 |
|
| 102 |
# Retrieving building data
|
|
@@ -107,7 +105,7 @@ with tab1:
|
|
| 107 |
bikelane_most_recent_prediction = bikelane_hist_model.predict(bikelane_most_recent_prediction)
|
| 108 |
bikelane_new['prediction'] = bikelane_most_recent_prediction
|
| 109 |
bikelane_new = bikelane_new.set_index(['time'])
|
| 110 |
-
st.dataframe(bikelane_new[['prediction']].tail(5)
|
| 111 |
|
| 112 |
if st.button("Update status"):
|
| 113 |
st.rerun()
|
|
|
|
| 61 |
@st.cache_data()
|
| 62 |
def retrieve_building(feature_group=api_building_newest_fg):
|
| 63 |
api_building_newest_fg = feature_group.select(["time", "x", "y", "z"])
|
| 64 |
+
df_building = api_building_newest_fg.read(read_options={"use_hive": True})
|
|
|
|
| 65 |
return df_building
|
| 66 |
|
| 67 |
# Retrieving building data
|
|
|
|
| 71 |
building_most_recent_prediction = building_hist_model.predict(building_most_recent_prediction)
|
| 72 |
building_new['prediction'] = building_most_recent_prediction
|
| 73 |
building_new = building_new.set_index(['time'])
|
| 74 |
+
st.dataframe(building_new[['prediction']].tail(5))
|
| 75 |
|
| 76 |
with col2:
|
| 77 |
st.markdown("Parking place near bikelane:")
|
|
|
|
| 95 |
def retrieve_bikelane(feature_group=api_bikelane_newest_fg):
|
| 96 |
api_bikelane_newest_fg = feature_group.select(["time", "x", "y", "z"])
|
| 97 |
df_bikelane = api_bikelane_newest_fg.read(read_options={"use_hive": True})
|
|
|
|
| 98 |
return df_bikelane
|
| 99 |
|
| 100 |
# Retrieving building data
|
|
|
|
| 105 |
bikelane_most_recent_prediction = bikelane_hist_model.predict(bikelane_most_recent_prediction)
|
| 106 |
bikelane_new['prediction'] = bikelane_most_recent_prediction
|
| 107 |
bikelane_new = bikelane_new.set_index(['time'])
|
| 108 |
+
st.dataframe(bikelane_new[['prediction']].tail(5))
|
| 109 |
|
| 110 |
if st.button("Update status"):
|
| 111 |
st.rerun()
|