luisotorres commited on
Commit
e57a437
·
1 Parent(s): 27c6518

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -81,11 +81,16 @@ class KMeansTransformer(BaseEstimator, TransformerMixin):
81
  # Loading the model
82
  pipe = joblib.load('wine_quality_prediction.pkl')
83
 
84
- # Define a function to take user inputs
 
 
 
 
 
85
  def get_user_input():
86
  input_dict = {}
87
- for feat in selected_features:
88
- input_value = st.number_input(f"Enter {feat} value", value=0.0, step=0.01)
89
  input_dict[feat] = input_value
90
  return pd.DataFrame([input_dict])
91
 
 
81
  # Loading the model
82
  pipe = joblib.load('wine_quality_prediction.pkl')
83
 
84
+ input_features = [
85
+ "fixed_acidity", "volatile_acidity", "citric_acid", "residual_sugar",
86
+ "chlorides", "free_sulfur_dioxide", "total_sulfur_dioxide", "density",
87
+ "pH", "sulphates", "alcohol"
88
+ ]
89
+
90
  def get_user_input():
91
  input_dict = {}
92
+ for feat in input_features:
93
+ input_value = st.number_input(f"Enter {feat}", value=0.0, step=0.01)
94
  input_dict[feat] = input_value
95
  return pd.DataFrame([input_dict])
96