Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ classification_threshold = 0.5
|
|
| 44 |
|
| 45 |
# Correction made to the codes
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
categorical_cols = [
|
| 50 |
'Partner', # Whether the customer has a partner (Yes/No)
|
|
@@ -56,7 +56,7 @@ categorical_cols = [
|
|
| 56 |
# same as training
|
| 57 |
]
|
| 58 |
|
| 59 |
-
|
| 60 |
input_df[categorical_cols]
|
| 61 |
.astype(str)
|
| 62 |
.fillna("missing")
|
|
|
|
| 44 |
|
| 45 |
# Correction made to the codes
|
| 46 |
|
| 47 |
+
input_data = pd.DataFrame([input_data])
|
| 48 |
|
| 49 |
categorical_cols = [
|
| 50 |
'Partner', # Whether the customer has a partner (Yes/No)
|
|
|
|
| 56 |
# same as training
|
| 57 |
]
|
| 58 |
|
| 59 |
+
input_data[categorical_cols] = (
|
| 60 |
input_df[categorical_cols]
|
| 61 |
.astype(str)
|
| 62 |
.fillna("missing")
|