Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,13 @@ from tensorflow.keras.models import load_model
|
|
12 |
|
13 |
# # Define the prediction function
|
14 |
def predict(age, workclass, education, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country):
|
15 |
-
|
|
|
|
|
|
|
16 |
columns = {
|
17 |
-
"age": [age], "workclass":[workclass], "educational-num":[education],
|
18 |
-
"
|
19 |
"hours-per-week":[hours_per_week], "native-country":[native_country]}
|
20 |
df = pd.DataFrame(data=columns)
|
21 |
fixed_features = cleaning_features(df)
|
|
|
12 |
|
13 |
# # Define the prediction function
|
14 |
def predict(age, workclass, education, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country):
|
15 |
+
# columns = {
|
16 |
+
# "age": [age], "workclass":[workclass], "educational-num":[education], "marital-status":[marital_status], "occupation":[occupation],
|
17 |
+
# "relationship":[relationship], "race":[race], "gender":[gender], "capital-gain":[capital_gain], "capital-loss":[capital_loss],
|
18 |
+
# "hours-per-week":[hours_per_week], "native-country":[native_country]}
|
19 |
columns = {
|
20 |
+
"age": [age], "workclass":[workclass], "educational-num":[education],
|
21 |
+
"race":[race], "gender":[gender], "capital-gain":[capital_gain], "capital-loss":[capital_loss],
|
22 |
"hours-per-week":[hours_per_week], "native-country":[native_country]}
|
23 |
df = pd.DataFrame(data=columns)
|
24 |
fixed_features = cleaning_features(df)
|