Syauqi Nabil Tasri commited on
Commit
9e1f6b4
·
verified ·
1 Parent(s): 38a0d73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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 = model.transform(input_features)
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)