import streamlit as st import pickle import pandas as pd st.title("Classification the Iris") sepal_length = st.text_input('Sepal_Length (cm)') sepal_width = st.text_input('Sepal_Width (cm)') petal_length = st.text_input('Petal_Length (cm)') petal_width = st.text_input('Petal_Width (cm)') dataframe = pd.DataFrame({"sepal length (cm)":[sepal_length],"sepal width (cm)":[sepal_width],'petal length (cm)':[petal_length],'petal width (cm)':[petal_width]}) if st.button('Prediction'): with open('model.pkl', 'rb') as file: loaded_model = pickle.load(file) final_output = loaded_model.predict(dataframe) if final_output == '0': st.write("The output class is setosa") elif final_output == '1': st.write("The output class is versicolor") elif final_output == '2': st.write("The output class is virginica")