Spaces:
Build error
Build error
Update app.py
Browse files1 unmodified line2345678 unmodified lines161718192021222324252627282930313233341 unmodified lineimport numpy as npimport pickleimport streamlit.components.v1 as components# Load the pickled modeldef load_model():8 unmodified lines# Add input fields for High, Open, and Low valuesimage = '17.png'st.image(image, use_column_width=True)st.subheader("Enter the following values:")Bhk = st.number_input("Bhk")Size = st.number_input("Size")Area_Type = st.number_input("Area_Type")Area_Locality = st.number_input("Area_Locality")City = st.number_input("City")Furnishing_Status = st.number_input("Furnishing_Status")Tenant_Preferred = st.number_input("Tenant_Preferred")Bathroom = st.number_input("Bathroom")Point_of_Contact = st.number_input("Point_of_Contact")# Create a feature list from the user inputsfeatures = [[Bhk,Size,Area_Type,Area_Locality,City,Furnishing_Status,Tenant_Preferred,Bathroom,Point_of_Contact]]1 unmodified line234567898 unmodified lines1819202122232425262728293031323334353637383940414243441 unmodified lineimport numpy as npimport pickleimport streamlit.components.v1 as componentsfrom sklearn.preprocessing import LabelEncoderle = import LabelEncoder()# Load the pickled modeldef load_model():8 unmodified lines# Add input fields for High, Open, and Low valuesimage = '17.png'st.image(image, use_column_width=True)def transform(text):text= le.fit_transform(text)return text[0]st.subheader("Enter the following values:")Bhk = st.number_input("Bhk")Size = st.number_input("Size")Area_Type = st.text_input("Area Type")Area_Type = transform(['Area_Type'])Area_Locality = st.number_input("Area Locality")City = st.text_input("City")City = transform(['City'])Furnishing_Status = st.text_input("Furnishing Status")Furnishing_Status = transform(['Furnishing_Status'])Tenant_Preferred = st.text_input("Tenant Preferred")Tenant_Preferred = transform(['Tenant_Preferred'])Bathroom = st.number_input("Bathroom")Point_of_Contact = st.text_input("Point of Contact")Point_of_Contact = transform(['Point_of_Contact'])# Create a feature list from the user inputsfeatures = [[Bhk,Size,Area_Type,Area_Locality,City,Furnishing_Status,Tenant_Preferred,Bathroom,Point_of_Contact]]
app.py+17-7