Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -613,20 +613,20 @@ elif page == "💸 Price Prediction":
|
|
| 613 |
|
| 614 |
# Prepare input data as JSON
|
| 615 |
input_data = pd.DataFrame({
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
|
| 631 |
# Load the preprocessor
|
| 632 |
with open('preprocessor.pkl', 'rb') as file:
|
|
|
|
| 613 |
|
| 614 |
# Prepare input data as JSON
|
| 615 |
input_data = pd.DataFrame({
|
| 616 |
+
"model_key": [car_model], # Wrap scalars in lists
|
| 617 |
+
"mileage": [mileage],
|
| 618 |
+
"engine_power": [engine_power],
|
| 619 |
+
"fuel": [fuel],
|
| 620 |
+
"paint_color": [paint_color],
|
| 621 |
+
"car_type": [car_type],
|
| 622 |
+
"private_parking_available": [private_parking_available],
|
| 623 |
+
"has_gps": [has_gps],
|
| 624 |
+
"has_air_conditioning": [has_air_conditioning],
|
| 625 |
+
"automatic_car": [automatic_car],
|
| 626 |
+
"has_getaround_connect": [has_getaround_connect],
|
| 627 |
+
"has_speed_regulator": [has_speed_regulator],
|
| 628 |
+
"winter_tires": [winter_tires]
|
| 629 |
+
})
|
| 630 |
|
| 631 |
# Load the preprocessor
|
| 632 |
with open('preprocessor.pkl', 'rb') as file:
|