Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -183,9 +183,10 @@ def _run_advisor(
|
|
| 183 |
age = _normalize_age(car_age_years, "Age")
|
| 184 |
make_model_input = make_model.strip() if make_model and make_model.strip() else predicted_class
|
| 185 |
|
|
|
|
| 186 |
price_input = {
|
| 187 |
"make_model": make_model_input,
|
| 188 |
-
"body_type":
|
| 189 |
"km": to_float(mileage_km, 80000),
|
| 190 |
"age": age,
|
| 191 |
}
|
|
|
|
| 183 |
age = _normalize_age(car_age_years, "Age")
|
| 184 |
make_model_input = make_model.strip() if make_model and make_model.strip() else predicted_class
|
| 185 |
|
| 186 |
+
# For price input, only use make_model; body_type from vision is not reliable vehicle type info
|
| 187 |
price_input = {
|
| 188 |
"make_model": make_model_input,
|
| 189 |
+
"body_type": None, # Let preprocessor handle imputation instead of using predicted class
|
| 190 |
"km": to_float(mileage_km, 80000),
|
| 191 |
"age": age,
|
| 192 |
}
|