Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,10 +36,8 @@ def predict(gender, SeniorCitizen, Partner, Dependents, Contract, tenure, Monthl
|
|
36 |
'PaperlessBilling': [PaperlessBilling] if PaperlessBilling else ['No'], # Replace None with default value
|
37 |
'PaymentMethod': [PaymentMethod] if PaymentMethod else ['Electronic check'], # Replace None with default value
|
38 |
'MonthlyCharges': [MonthlyCharges] if MonthlyCharges else [0.0], # Replace None with default value
|
39 |
-
'TotalCharges': [TotalCharges] if TotalCharges else [0.0] # Replace None with default value
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
# Make predictions using the loaded logistic regression model
|
44 |
#predict probabilities
|
45 |
predictions = full_pipeline.predict_proba(input_data)
|
|
|
36 |
'PaperlessBilling': [PaperlessBilling] if PaperlessBilling else ['No'], # Replace None with default value
|
37 |
'PaymentMethod': [PaymentMethod] if PaymentMethod else ['Electronic check'], # Replace None with default value
|
38 |
'MonthlyCharges': [MonthlyCharges] if MonthlyCharges else [0.0], # Replace None with default value
|
39 |
+
'TotalCharges': [TotalCharges] if TotalCharges else [0.0] # Replace None with default value})
|
40 |
+
|
|
|
|
|
41 |
# Make predictions using the loaded logistic regression model
|
42 |
#predict probabilities
|
43 |
predictions = full_pipeline.predict_proba(input_data)
|