Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ import gradio as gr
|
|
3 |
import pandas as pd
|
4 |
|
5 |
# Load the preprocessor and the best model
|
6 |
-
preprocessor = joblib.load('
|
7 |
-
best_model = joblib.load('
|
8 |
|
9 |
# Define the prediction function
|
10 |
def predict_income(age, workclass, fnlwgt, education, education_num, marital_status, occupation, relationship, race, sex, capital_gain, capital_loss, hours_per_week, native_country):
|
|
|
3 |
import pandas as pd
|
4 |
|
5 |
# Load the preprocessor and the best model
|
6 |
+
preprocessor = joblib.load('preprocessor.pkl')
|
7 |
+
best_model = joblib.load('best_model_gradient_boosting.pkl')
|
8 |
|
9 |
# Define the prediction function
|
10 |
def predict_income(age, workclass, fnlwgt, education, education_num, marital_status, occupation, relationship, race, sex, capital_gain, capital_loss, hours_per_week, native_country):
|