Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import pickle | |
| import pandas as pd | |
| import numpy as np | |
| # import requests | |
| data =pd.read_csv('clean_data.csv') | |
| pipe=pickle.load(open("LinearModle_.pkl",'rb')) | |
| location =st.selectbox('Select the location',data['location'].unique()) | |
| bhk =st.number_input("Enter the BHK ",step=1) | |
| bath =st.number_input("Enter the number of Bathrooms",step=1) | |
| sqft =st.number_input("Enter the the area of flat") | |
| def predict(): | |
| input= pd.DataFrame([[location,sqft,bath,bhk]],columns=['location','total_sqft','bath','bhk']) | |
| prediction = pipe.predict(input)[0] * 1e5 # Its converted into lakhs | |
| print(prediction) | |
| # print(type(location),type(bhk),type(bath),type(sqft)) | |
| return np.abs(np.round(prediction,2)) | |
| if(st.button('Check_the_price')): | |
| st.write("The approximate price of this property is: ") | |
| st.write(predict()," In Indian Ruppee") | |