YeBhoneLin10 commited on
Commit
8707ced
·
verified ·
1 Parent(s): 8df7a86

Delete main.py

Browse files
Files changed (1) hide show
  1. main.py +0 -23
main.py DELETED
@@ -1,23 +0,0 @@
1
- import streamlit as st
2
- import pickle
3
- import pandas as pd
4
-
5
- st.title("Classification the Iris")
6
-
7
- sepal_length = st.text_input('Sepal_Length (cm)')
8
- sepal_width = st.text_input('Sepal_Width (cm)')
9
- petal_length = st.text_input('Petal_Length (cm)')
10
- petal_width = st.text_input('Petal_Width (cm)')
11
-
12
- dataframe = pd.DataFrame({"sepal length (cm)":[sepal_length],"sepal width (cm)":[sepal_width],'petal length (cm)':[petal_length],'petal width (cm)':[petal_width]})
13
-
14
- if st.button('Prediction'):
15
- with open('model.pkl', 'rb') as file:
16
- loaded_model = pickle.load(file)
17
- final_output = loaded_model.predict(dataframe)
18
- if final_output == '0':
19
- st.write("The output class is setosa")
20
- elif final_output == '1':
21
- st.write("The output class is versicolor")
22
- elif final_output == '2':
23
- st.write("The output class is virginica")