import pickle import pandas as pd import numpy as np import streamlit as st import sklearn model_file = "/model.pkl" try: with open(model_file,'rb') as file: model = pickle.load(file) except FileNotFoundError: st.error("The file was not found in the directory") st.title("FLower Classification using Streamlit on IRIS DATASET") st.header("Enter your flower features to get the classification prediction") sepal_length = st.number_input("Enter yuour sepal length") sepal_width = st.number_input("Enter yuour sepal width") petal_length = st.number_input("Enter yuour petal length") petal_width = st.number_input("Enter yuour petal width") if st.button("PREDICT"): features = np.array([[sepal_length,sepal_width,petal_length,petal_width]]) prediction = model.predict(features)[0] st.subheader("Prediction has been made") st.write("Theprediction for your features is",predicton)