Commit
·
95f77b2
1
Parent(s):
6614e23
Update main.py
Browse files
main.py
CHANGED
@@ -45,10 +45,10 @@ async def predict(input: InputFeatures):
|
|
45 |
|
46 |
|
47 |
full_pipeline=ColumnTransformer([('num_pipe',num_pipeline,num_attr)])
|
48 |
-
|
49 |
|
50 |
final_input = np.array(full_pipeline.transform(df), dtype=np.str)
|
51 |
-
|
52 |
|
53 |
XGB = Pipeline([
|
54 |
("col_trans", full_pipeline), # You need to define full_pipeline
|
|
|
45 |
|
46 |
|
47 |
full_pipeline=ColumnTransformer([('num_pipe',num_pipeline,num_attr)])
|
48 |
+
full_pipeline.fit(df) # Fit the full pipeline on the DataFrame
|
49 |
|
50 |
final_input = np.array(full_pipeline.transform(df), dtype=np.str)
|
51 |
+
prediction = model_input.predict(final_input)
|
52 |
|
53 |
XGB = Pipeline([
|
54 |
("col_trans", full_pipeline), # You need to define full_pipeline
|