Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,6 +65,7 @@ app = FastAPI(
|
|
| 65 |
|
| 66 |
|
| 67 |
class RentalFeatures(BaseModel):
|
|
|
|
| 68 |
mileage: int
|
| 69 |
engine_power: int
|
| 70 |
fuel: str
|
|
@@ -102,6 +103,7 @@ async def predict(predictionFeatures: RentalFeatures):
|
|
| 102 |
"""
|
| 103 |
# Read data
|
| 104 |
pf = [
|
|
|
|
| 105 |
predictionFeatures.mileage or 0,
|
| 106 |
predictionFeatures.engine_power or 0,
|
| 107 |
predictionFeatures.fuel or "petrol",
|
|
|
|
| 65 |
|
| 66 |
|
| 67 |
class RentalFeatures(BaseModel):
|
| 68 |
+
model_key: str
|
| 69 |
mileage: int
|
| 70 |
engine_power: int
|
| 71 |
fuel: str
|
|
|
|
| 103 |
"""
|
| 104 |
# Read data
|
| 105 |
pf = [
|
| 106 |
+
predictionFeatures.model_key or "Peugeot",
|
| 107 |
predictionFeatures.mileage or 0,
|
| 108 |
predictionFeatures.engine_power or 0,
|
| 109 |
predictionFeatures.fuel or "petrol",
|