matsammut commited on
Commit
beae65e
·
verified ·
1 Parent(s): 222afde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ def predict(age, workclass, education, marital_status, occupation, relationship,
17
  "age", "workclass", "educational-num", "marital-status", "occupation",
18
  "relationship", "race", "gender", "capital-gain", "capital-loss",
19
  "hours-per-week", "native-country"]
20
- df = pd.DataFrame(index=features, columns=columns)
21
  fixed_features = cleaning_features(df)
22
  # prediction = model.predict(features)
23
  # prediction = 1
@@ -49,7 +49,7 @@ def cleaning_features(data):
49
  # Binarize native country
50
  data['native-country'] = data['native-country'].apply(lambda x: x == 'United-States')
51
  data['native-country'] = data['native-country'].astype(int)
52
- #data = pca(data)
53
  return data
54
 
55
  # def pca(data):
 
17
  "age", "workclass", "educational-num", "marital-status", "occupation",
18
  "relationship", "race", "gender", "capital-gain", "capital-loss",
19
  "hours-per-week", "native-country"]
20
+ df = pd.DataFrame(data=features, columns=columns)
21
  fixed_features = cleaning_features(df)
22
  # prediction = model.predict(features)
23
  # prediction = 1
 
49
  # Binarize native country
50
  data['native-country'] = data['native-country'].apply(lambda x: x == 'United-States')
51
  data['native-country'] = data['native-country'].astype(int)
52
+ data = pca(data)
53
  return data
54
 
55
  # def pca(data):