matsammut commited on
Commit
0c9d457
·
verified ·
1 Parent(s): 7702d79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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
- features = [age, workclass, education, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country]
 
 
 
16
  columns = {
17
- "age": [age], "workclass":[workclass], "educational-num":[education], "marital-status":[marital_status], "occupation":[occupation],
18
- "relationship":[relationship], "race":[race], "gender":[gender], "capital-gain":[capital_gain], "capital-loss":[capital_loss],
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)