Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mport streamlit as st
|
| 2 |
+
import pickle
|
| 3 |
+
|
| 4 |
+
# Load the model
|
| 5 |
+
model = pickle.load(open('house_price_model.pkl', 'rb'))
|
| 6 |
+
st.title('House Price Prediction 🏡')
|
| 7 |
+
# User inputs
|
| 8 |
+
living_area = st.number_input('Living Area (sqft)')
|
| 9 |
+
bedrooms = st.number_input('Number of Bedrooms')
|
| 10 |
+
# Predict house price
|
| 11 |
+
if st.button('Predict Price'):
|
| 12 |
+
prediction = model.predict([[living_area, bedrooms]])
|
| 13 |
+
st.write(f'Predicted House Price: ${prediction[0]:.2f}')
|