Spaces:
Runtime error
Runtime error
File size: 912 Bytes
d35f87f 51ea566 d35f87f 51ea566 d35f87f 51ea566 7fe08ab d35f87f 51ea566 d35f87f 51ea566 d35f87f 51ea566 d35f87f 51ea566 d35f87f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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) |