Spaces:
Sleeping
Sleeping
Syauqi Nabil Tasri commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
import pickle
|
| 4 |
-
|
|
|
|
| 5 |
# Load the fitted model
|
| 6 |
model = pickle.load(open('model (10).pkl', 'rb'))
|
| 7 |
|
|
@@ -41,7 +43,7 @@ if st.button('Predict'):
|
|
| 41 |
eccentricity, extent, convex_area]]
|
| 42 |
|
| 43 |
# Lakukan scaling pada input
|
| 44 |
-
input_features_scaled =
|
| 45 |
|
| 46 |
# Prediksi menggunakan model
|
| 47 |
prediction = model.predict(input_features_scaled)
|
|
|
|
| 1 |
+
|
| 2 |
import streamlit as st
|
| 3 |
import pandas as pd
|
| 4 |
import pickle
|
| 5 |
+
from sklearn.preprocessing import MinMaxScaler
|
| 6 |
+
scaler = MinMaxScaler()
|
| 7 |
# Load the fitted model
|
| 8 |
model = pickle.load(open('model (10).pkl', 'rb'))
|
| 9 |
|
|
|
|
| 43 |
eccentricity, extent, convex_area]]
|
| 44 |
|
| 45 |
# Lakukan scaling pada input
|
| 46 |
+
input_features_scaled = scaler.transform(input_features)
|
| 47 |
|
| 48 |
# Prediksi menggunakan model
|
| 49 |
prediction = model.predict(input_features_scaled)
|