Spaces:
Sleeping
Sleeping
Syauqi Nabil Tasri commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,10 +22,22 @@ eccentricity = st.slider('Eccentricity', min_value=0.75693, max_value=0.81012, s
|
|
| 22 |
extent = st.slider('Extent', min_value=0.656535, max_value=0.725739, step=0.01)
|
| 23 |
convex_area = st.number_input('Convex hull (convex area)', min_value=18068.0, max_value=36683.0, step=0.01)
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Tombol untuk memprediksi
|
| 26 |
if st.button('Predict'):
|
| 27 |
input_features = [[length_major_axis, width_minor_axis, thickness_depth, area,
|
| 28 |
perimeter, roundness, solidity, compactness, aspect_ratio,
|
| 29 |
eccentricity, extent, convex_area]]
|
| 30 |
prediction = model.predict(input_features)
|
|
|
|
|
|
|
| 31 |
st.write(f'The predicted class is: {prediction[0]}')
|
|
|
|
|
|
|
|
|
| 22 |
extent = st.slider('Extent', min_value=0.656535, max_value=0.725739, step=0.01)
|
| 23 |
convex_area = st.number_input('Convex hull (convex area)', min_value=18068.0, max_value=36683.0, step=0.01)
|
| 24 |
|
| 25 |
+
# # Tombol untuk memprediksi
|
| 26 |
+
# if st.button('Predict'):
|
| 27 |
+
# input_features = [[length_major_axis, width_minor_axis, thickness_depth, area,
|
| 28 |
+
# perimeter, roundness, solidity, compactness, aspect_ratio,
|
| 29 |
+
# eccentricity, extent, convex_area]]
|
| 30 |
+
# prediction = model.predict(input_features)
|
| 31 |
+
# st.write(f'The predicted class is: {prediction[0]}')
|
| 32 |
+
|
| 33 |
# Tombol untuk memprediksi
|
| 34 |
if st.button('Predict'):
|
| 35 |
input_features = [[length_major_axis, width_minor_axis, thickness_depth, area,
|
| 36 |
perimeter, roundness, solidity, compactness, aspect_ratio,
|
| 37 |
eccentricity, extent, convex_area]]
|
| 38 |
prediction = model.predict(input_features)
|
| 39 |
+
prediction_proba = model.predict_proba(input_features)
|
| 40 |
+
|
| 41 |
st.write(f'The predicted class is: {prediction[0]}')
|
| 42 |
+
st.write(f'Prediction probabilities: {prediction_proba}')
|
| 43 |
+
|