Spaces:
Sleeping
Sleeping
Download app.py from abhijeetarjun1996/classification: direct link, hf CLI and curl.
- Browser
- Download file 776 Bytes
-
https://huggingface.co/spaces/abhijeetarjun1996/classification/resolve/main/app.py
- Command line
-
hf download hf://spaces/abhijeetarjun1996/classification/app.py
-
curl -L -o app.py https://huggingface.co/spaces/abhijeetarjun1996/classification/resolve/main/app.py
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) |