|
import streamlit as st |
|
import pickle |
|
import numpy as np |
|
|
|
|
|
MODEL_PATH = 'MODEL_PATH = 'cloth_recommendation (3).pkl' |
|
' |
|
|
|
|
|
with open(MODEL_PATH, 'rb') as f: |
|
model = pickle.load(f) |
|
|
|
|
|
def predict_size(height, weight, age): |
|
return model.predict(np.array([[height, weight, age]]))[0] |
|
|
|
|
|
st.title('Size Prediction App') |
|
|
|
st.write("Enter the following details to predict the size:") |
|
|
|
height = st.number_input('Height (cm)', min_value=0.0, step=0.1) |
|
weight = st.number_input('Weight (kg)', min_value=0.0, step=0.1) |
|
age = st.number_input('Age (years)', min_value=0.0, step=0.1) |
|
|
|
if st.button('Predict Size'): |
|
size = predict_size(height, weight, age) |
|
st.write(f'Predicted Size: {size:.2f}') |