import numpy as np import pickle import pandas as pd import streamlit as st import json from PIL import Image import warnings warnings.filterwarnings('ignore') pickle_in = open("banglore_home_prices_model.pickle","rb") classifier=pickle.load(pickle_in) with open("columns.json", "r") as f: __data_columns = json.load(f)['data_columns'] __locations = __data_columns[3:] def welcome(): return "Welcome All" def predict_note_authentication(sqft,bhk,bath,loc): try: loc_index = __data_columns.index(loc.lower()) except: loc_index = -1 x = np.zeros(len(__data_columns)) x[0] = sqft x[1] = bath x[2] = bhk if loc_index>=0: x[loc_index] = 1 prediction=round(classifier.predict([x])[0],2) return round(classifier.predict([x])[0],2) def main(): html_temp = """