mewmnp commited on
Commit
5e4aca1
·
1 Parent(s): ac3aea4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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('Predict')
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([[sLen,sWid,pLen,pWid]])])
 
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])