classification / app.py
abhijeetarjun1996's picture
Update app.py
5df329f verified
Raw History Blame Contribute Delete
776 Bytes
import streamlit as st
import pandas as pd
import numpy as np
import pickle
from sklearn.preprocessing import StandardScaler,OneHotEncoder
from sklearn.linear_model import LinearRegression
from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
# Take input from user
Breed = st.text_input("Enter the breed of the cat")
Age = st.number_input("Enter the age(number of years) of the Cat")
Weight = st.number_input("Enter the weight(kg) of the cat")
Color = st.text_input("Enter the average sleep duration of the student")
Gender = st.text_input("Enter the gender of the cats: M or F")
model = pickle.load(open("lr.pkl","rb"))
if st.button("Predict"):
prediction = model.predict([[Breed,Age,Weight,Color ,Gender]])
st.write("cats:",prediction)