Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ with st.form(key='my_form'):
|
|
6 |
sWid = st.slider('sepal width(cm) ', 0.0, 10.0)
|
7 |
pLen = st.slider('petal length(cm) ', 0.0, 10.0)
|
8 |
pWid = st.slider('petal width(cm) ', 0.0, 10.0)
|
9 |
-
st.form_submit_button('
|
10 |
|
11 |
|
12 |
iris = datasets.load_iris()
|
@@ -14,4 +14,4 @@ x,y = iris.data, iris.target
|
|
14 |
knn = neighbors.KNeighborsClassifier(n_neighbors=6)
|
15 |
knn.fit(x,y)
|
16 |
predict = knn.predict([[sLen,sWid,pLen,pWid]])
|
17 |
-
st.text(iris.target_names[predict
|
|
|
6 |
sWid = st.slider('sepal width(cm) ', 0.0, 10.0)
|
7 |
pLen = st.slider('petal length(cm) ', 0.0, 10.0)
|
8 |
pWid = st.slider('petal width(cm) ', 0.0, 10.0)
|
9 |
+
st.form_submit_button('predict')
|
10 |
|
11 |
|
12 |
iris = datasets.load_iris()
|
|
|
14 |
knn = neighbors.KNeighborsClassifier(n_neighbors=6)
|
15 |
knn.fit(x,y)
|
16 |
predict = knn.predict([[sLen,sWid,pLen,pWid]])
|
17 |
+
st.text(iris.target_names[predict])
|