Spaces:
Sleeping
Sleeping
File size: 776 Bytes
5534f14 4518aaa 5df329f 5534f14 4518aaa 5534f14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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) |