Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,11 @@ df = pd.read_csv('processed_data.csv') # Replace with the correct path to your
|
|
12 |
# Load the LabelEncoder and ColumnTransformer before prediction
|
13 |
with open('label_encoder.pkl', 'rb') as f:
|
14 |
label_encoder = pickle.load(f)
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
# Assuming 'ct' is your ColumnTransformer (replace this with the actual loading code for your preprocessor)
|
17 |
# Make sure that 'ct' is properly loaded, or use the same transformation logic here.
|
18 |
|
|
|
12 |
# Load the LabelEncoder and ColumnTransformer before prediction
|
13 |
with open('label_encoder.pkl', 'rb') as f:
|
14 |
label_encoder = pickle.load(f)
|
15 |
+
|
16 |
+
ct = ColumnTransformer(
|
17 |
+
transformers=[('encoder', OneHotEncoder(sparse_output=False, drop="first"),[0, 1, 9, 10])],
|
18 |
+
remainder="passthrough"
|
19 |
+
)
|
20 |
# Assuming 'ct' is your ColumnTransformer (replace this with the actual loading code for your preprocessor)
|
21 |
# Make sure that 'ct' is properly loaded, or use the same transformation logic here.
|
22 |
|