rashid01 commited on
Commit
df6e739
·
verified ·
1 Parent(s): 0fd6f85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -61,7 +61,10 @@ input_data[num_features] = scaler.transform(input_data[num_features])
61
 
62
  # Add the additional feature (not part of scaling)
63
  input_data['loan_amnt_by_income'] = [loan_amnt_by_income]
64
- input_data['cibil_score'] = cibil_score # Add cibil_score directly without scaling
 
 
 
65
 
66
  # Predict using the model
67
  if st.button('Predict'):
 
61
 
62
  # Add the additional feature (not part of scaling)
63
  input_data['loan_amnt_by_income'] = [loan_amnt_by_income]
64
+
65
+ # Drop the 'cibil_score' before making predictions as it was not part of the training data
66
+ input_data['cibil_score'] = cibil_score # Add cibil_score for other uses, if needed
67
+ input_data = input_data[num_features + ['loan_amnt_by_income']] # Only keep features the model knows
68
 
69
  # Predict using the model
70
  if st.button('Predict'):