File size: 423 Bytes
1230c34 | 1 2 3 4 5 6 7 8 9 10 11 12 | import joblib
import streamlit as st
import numpy as np
def predict(data):
clf=joblib.load("rf_model.sav")
return clf.predict(data)
from predictions import predict
if st.button("Predict type of Iris"):
result = predict(np.array([['Normal_Weight', 'Overweight_Level_I', 'Overweight_Level_II',
'Obesity_Type_I', 'Insufficient_Weight', 'Obesity_Type_II',
'Obesity_Type_III']]))
st.text(result[0]) |