Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -61,32 +61,18 @@ with col1:
|
|
61 |
'Skykomish', 'Snoqualmie', 'Snoqualmie Pass', 'Tukwila', 'Vashon',
|
62 |
'Woodinville', 'Yarrow Point'],
|
63 |
)
|
|
|
64 |
bedrooms = st.slider('Bedrooms', min_value=min_dict['bedrooms'], max_value=max_dict['bedrooms'], value=min_dict['bedrooms'])
|
65 |
bathrooms = st.slider('Bathrooms', min_value=min_dict['bathrooms'], max_value=max_dict['bathrooms'], value=min_dict['bathrooms'])
|
66 |
sqft_living = st.slider('Square Feet (Living)', min_value=min_dict['sqft_living'], max_value=max_dict['sqft_living'], value=min_dict['sqft_living'])
|
67 |
sqft_lot = st.slider('Square Feet (Lot)', min_value=min_dict['sqft_lot'], max_value=max_dict['sqft_lot'], value=min_dict['sqft_lot'])
|
68 |
floors = st.slider('Floors', min_value=min_dict['floors'], max_value=max_dict['floors'], value=min_dict['floors'])
|
69 |
-
waterfront = st.checkbox('Waterfront', value=False, )
|
70 |
view = st.slider('View', min_value=min_dict['view'], max_value=max_dict['view'], value=min_dict['view'])
|
71 |
condition = st.slider('Condition', min_value=min_dict['condition'], max_value=max_dict['condition'], value=min_dict['condition'])
|
72 |
sqft_above = st.slider('Square Feet (Above)', min_value=min_dict['sqft_above'], max_value=max_dict['sqft_above'], value=min_dict['sqft_above'])
|
73 |
sqft_basement = st.slider('Square Feet (Basement)', min_value=min_dict['sqft_basement'], max_value=max_dict['sqft_basement'], value=min_dict['sqft_basement'])
|
74 |
yr_built = st.slider('Year Built', min_value=min_dict['yr_built'], max_value=max_dict['yr_built'], value=min_dict['yr_built'])
|
75 |
yr_renovated = st.slider('Year Renovated', min_value=min_dict['yr_renovated'], max_value=max_dict['yr_renovated'], value=min_dict['yr_renovated'])
|
76 |
-
|
77 |
-
# if (city != 'Algona' or # Assuming Algona as the default value
|
78 |
-
# bedrooms != min_dict['bedrooms'] or
|
79 |
-
# bathrooms != min_dict['bathrooms'] or
|
80 |
-
# sqft_living != min_dict['sqft_living'] or
|
81 |
-
# sqft_lot != min_dict['sqft_lot'] or
|
82 |
-
# floors != min_dict['floors'] or
|
83 |
-
# int(waterfront) != 0 or # Assuming default value for waterfront is 0
|
84 |
-
# view != min_dict['view'] or
|
85 |
-
# condition != min_dict['condition'] or
|
86 |
-
# sqft_above != min_dict['sqft_above'] or
|
87 |
-
# sqft_basement != min_dict['sqft_basement'] or
|
88 |
-
# yr_built != min_dict['yr_built'] or
|
89 |
-
# yr_renovated != min_dict['yr_renovated']):
|
90 |
|
91 |
new_pred = init_new_pred()
|
92 |
new_pred['bedrooms'] = bedrooms
|
@@ -338,7 +324,8 @@ with col2:
|
|
338 |
st.map(map_data)
|
339 |
|
340 |
# Placeholder for displaying the predicted price at the top
|
341 |
-
price_placeholder = st.empty()
|
|
|
342 |
|
343 |
# Display the predicted price at the top of the app
|
344 |
price_placeholder.write(f"Predicted Price: ${predicted_price[0][0]:,.2f}")
|
|
|
61 |
'Skykomish', 'Snoqualmie', 'Snoqualmie Pass', 'Tukwila', 'Vashon',
|
62 |
'Woodinville', 'Yarrow Point'],
|
63 |
)
|
64 |
+
waterfront = st.checkbox('Waterfront', value=False)
|
65 |
bedrooms = st.slider('Bedrooms', min_value=min_dict['bedrooms'], max_value=max_dict['bedrooms'], value=min_dict['bedrooms'])
|
66 |
bathrooms = st.slider('Bathrooms', min_value=min_dict['bathrooms'], max_value=max_dict['bathrooms'], value=min_dict['bathrooms'])
|
67 |
sqft_living = st.slider('Square Feet (Living)', min_value=min_dict['sqft_living'], max_value=max_dict['sqft_living'], value=min_dict['sqft_living'])
|
68 |
sqft_lot = st.slider('Square Feet (Lot)', min_value=min_dict['sqft_lot'], max_value=max_dict['sqft_lot'], value=min_dict['sqft_lot'])
|
69 |
floors = st.slider('Floors', min_value=min_dict['floors'], max_value=max_dict['floors'], value=min_dict['floors'])
|
|
|
70 |
view = st.slider('View', min_value=min_dict['view'], max_value=max_dict['view'], value=min_dict['view'])
|
71 |
condition = st.slider('Condition', min_value=min_dict['condition'], max_value=max_dict['condition'], value=min_dict['condition'])
|
72 |
sqft_above = st.slider('Square Feet (Above)', min_value=min_dict['sqft_above'], max_value=max_dict['sqft_above'], value=min_dict['sqft_above'])
|
73 |
sqft_basement = st.slider('Square Feet (Basement)', min_value=min_dict['sqft_basement'], max_value=max_dict['sqft_basement'], value=min_dict['sqft_basement'])
|
74 |
yr_built = st.slider('Year Built', min_value=min_dict['yr_built'], max_value=max_dict['yr_built'], value=min_dict['yr_built'])
|
75 |
yr_renovated = st.slider('Year Renovated', min_value=min_dict['yr_renovated'], max_value=max_dict['yr_renovated'], value=min_dict['yr_renovated'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
new_pred = init_new_pred()
|
78 |
new_pred['bedrooms'] = bedrooms
|
|
|
324 |
st.map(map_data)
|
325 |
|
326 |
# Placeholder for displaying the predicted price at the top
|
327 |
+
# price_placeholder = st.empty()
|
328 |
+
price_placeholder = st.subheader()
|
329 |
|
330 |
# Display the predicted price at the top of the app
|
331 |
price_placeholder.write(f"Predicted Price: ${predicted_price[0][0]:,.2f}")
|