EdBoy2202 commited on
Commit
fcc6a63
·
verified ·
1 Parent(s): ef8a626

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -71,21 +71,21 @@ def load_model_and_encodings():
71
  def predict_price(model, brand, model_name, year):
72
  # Create a dictionary with default values for the specified categories
73
  input_data = {
74
- 'year': year,
75
- 'odometer': year * 12000, # Estimate based on year and average annual mileage
76
- 'age': datetime.now().year - year,
77
- 'age_squared': (datetime.now().year - year) ** 2,
78
- 'mileage_per_year': 12000,
79
- 'make': brand, # Use the separated make
80
- 'model': model_name, # Use the separated model
81
- 'condition': 'Used',
82
- 'fuel': 'Gasoline',
83
- 'title_status': 'Clean',
84
- 'transmission': 'Automatic',
85
- 'drive': 'Fwd',
86
- 'size': 'Mid-Size',
87
- 'type': 'Sedan',
88
- 'paint_color': 'White'
89
  }
90
 
91
  # Prepare the input for the model
 
71
  def predict_price(model, brand, model_name, year):
72
  # Create a dictionary with default values for the specified categories
73
  input_data = {
74
+ 'Year': year,
75
+ 'Odometer': year * 12000, # Estimate based on year and average annual mileage
76
+ 'Age': datetime.now().year - year,
77
+ 'Age_squared': (datetime.now().year - year) ** 2,
78
+ 'Mileage_per_year': 12000,
79
+ 'Make': brand, # Use the separated make
80
+ 'Model': model_name, # Use the separated model
81
+ 'Condition': 'Used',
82
+ 'Fuel': 'Gasoline',
83
+ 'Title_status': 'Clean',
84
+ 'Transmission': 'Automatic',
85
+ 'Drive': 'Fwd',
86
+ 'Size': 'Mid-Size',
87
+ 'Type': 'Sedan',
88
+ 'Paint_color': 'White'
89
  }
90
 
91
  # Prepare the input for the model