Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"
|