Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import pandas as pd
|
|
3 |
import pickle
|
4 |
import json
|
5 |
import pydeck as pdk
|
6 |
-
|
7 |
|
8 |
st.set_page_config(layout="wide")
|
9 |
|
@@ -68,7 +68,7 @@ with col1:
|
|
68 |
|
69 |
st.markdown('</div>', unsafe_allow_html=True)
|
70 |
|
71 |
-
new_pred = init_new_pred()
|
72 |
new_pred['bedrooms'] = bedrooms
|
73 |
new_pred['bathrooms'] = bathrooms
|
74 |
new_pred['sqft_living'] = sqft_living
|
@@ -85,9 +85,9 @@ with col1:
|
|
85 |
|
86 |
# Process the prediction
|
87 |
new_pred = pd.DataFrame([new_pred])
|
88 |
-
new_pred = create_new_features(new_pred)
|
89 |
-
new_pred = bucketize(new_pred)
|
90 |
-
new_pred = normalize(new_pred)
|
91 |
|
92 |
# Predict the price
|
93 |
predicted_price = model.predict(new_pred)
|
|
|
3 |
import pickle
|
4 |
import json
|
5 |
import pydeck as pdk
|
6 |
+
import utils
|
7 |
|
8 |
st.set_page_config(layout="wide")
|
9 |
|
|
|
68 |
|
69 |
st.markdown('</div>', unsafe_allow_html=True)
|
70 |
|
71 |
+
new_pred = utils.init_new_pred()
|
72 |
new_pred['bedrooms'] = bedrooms
|
73 |
new_pred['bathrooms'] = bathrooms
|
74 |
new_pred['sqft_living'] = sqft_living
|
|
|
85 |
|
86 |
# Process the prediction
|
87 |
new_pred = pd.DataFrame([new_pred])
|
88 |
+
new_pred = utils.create_new_features(new_pred)
|
89 |
+
new_pred = utils.bucketize(new_pred)
|
90 |
+
new_pred = utils.normalize(new_pred)
|
91 |
|
92 |
# Predict the price
|
93 |
predicted_price = model.predict(new_pred)
|