matsammut commited on
Commit
bfbd8d4
·
verified ·
1 Parent(s): 3c78fe7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -11,6 +11,7 @@ model = joblib.load("ann_model.joblib")
11
  # # Define the prediction function
12
  def predict(age, workclass, education, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country):
13
  features = [age, workclass, education, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country]
 
14
  prediction = model.predict(features)
15
  prediction = 1
16
  return "Income >50K" if prediction == 1 else "Income <=50K"
 
11
  # # Define the prediction function
12
  def predict(age, workclass, education, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country):
13
  features = [age, workclass, education, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country]
14
+ fixed_features = cleaning_features(features)
15
  prediction = model.predict(features)
16
  prediction = 1
17
  return "Income >50K" if prediction == 1 else "Income <=50K"