Spaces:
Build error
Build error
LethallyHealthy
commited on
Commit
·
3afae0b
1
Parent(s):
443a0c2
Update app.py
Browse files
app.py
CHANGED
@@ -127,15 +127,33 @@ pd.DataFrame(interaction_values[0].round(2)).head(60)
|
|
127 |
|
128 |
#INTERFACE
|
129 |
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
-
data = {
|
133 |
-
"OverallQual": OverallQual
|
134 |
-
}
|
135 |
-
if(OverallQual > 3):
|
136 |
-
out = "Nice House"
|
137 |
-
elif(OverallQual > 1):
|
138 |
-
out = "Not the Worst"
|
139 |
-
else:
|
140 |
-
out = "Really Bad"
|
141 |
-
st.json(out)
|
|
|
127 |
|
128 |
#INTERFACE
|
129 |
|
130 |
+
data = {}
|
131 |
+
for label in X_test.columns:
|
132 |
+
data[label] = 0
|
133 |
+
|
134 |
+
data["OverallQual"] = st.slider("Overall Quality", 1, 5)
|
135 |
+
data["GrLivArea"] = st.slider("Above ground Living Area (sqft):", 0, 5000)
|
136 |
+
data["YearBuilt"] = st.number_input("Year Built: ", value=2000, min_value=1800, max_value=2023)
|
137 |
+
data["TotalBsmtSF"] = st.number_input("Total Basement Square Footage:", value=0, min_value=0)
|
138 |
+
data["BsmtFinSF1"] = st.number_input("Square Footage of Type 1 Basement (same as total if one type):", value=0, min_value=0)
|
139 |
+
data["YearRemodAdd"] = st.number_input("Year of Remodeling/Additions (same as year built if no remodeling)", value = 2000, min_value= 1800,max_value=2023)
|
140 |
+
data["LotArea"] = st.slider("Lot Area:", 0, 5000)
|
141 |
+
data["OverallCond"] = st.slider("Overall Condition of the House (5 being the best):", 1, 5)
|
142 |
+
data["1stFlrSF"] = st.number_input("First Floor Square Footage:", min_value=0,value=0)
|
143 |
+
data["GarageCars"] = st.slider_input("Number of Cars the Garage Can Hold:", 0, 10)
|
144 |
+
data["2ndFlrSF"] = st.number_input("Second Floor Square Footage:", value=0, min_value=0)
|
145 |
+
data["Fireplaces"] = st.slider("Number of Fireplaces:", 0, 10)
|
146 |
+
data["Neighborhood"] = st.slider("Neighborhood:", 0, 24)
|
147 |
+
data["GarageArea"] = st.number_input("Garage Area (sqft):", value= 0, min_value=0)
|
148 |
+
data["BsmtFullBath"] = st.slider("Number of Full Bathrooms in the Basement:", 0, 5)
|
149 |
+
data["FullBath"] = st.slider("Number of Full Bathroooms Above Ground:", 0, 5)
|
150 |
+
data["HalfBath"] = st.slider("Number of Half Bathrooms Above Ground (no shower):", 0, 5)
|
151 |
+
data["KitchenQual"] = st.slider("Quality of the Kitchen", 1, 5)
|
152 |
+
data["OpenPorchSF"] = st.number_input("Open Porch Square Footage:", value=0, min_value=0)
|
153 |
+
data["MoSold"] = st.slider("Month Sold:", 1,12)
|
154 |
+
|
155 |
+
if st.button("Calculate"):
|
156 |
+
results = make_a_prediction(model,data)
|
157 |
+
print(results)
|
158 |
+
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|