Update app.py
Browse files
app.py
CHANGED
|
@@ -68,20 +68,20 @@ def price(make,model,trim,mileage,car_type,cylinder,liter,doors,cruise,sound,lea
|
|
| 68 |
})
|
| 69 |
prediction=pipe.predict(input_data)[0]
|
| 70 |
return prediction
|
| 71 |
-
st.title("
|
| 72 |
-
st.write("
|
| 73 |
-
make=st.selectbox("
|
| 74 |
model=st.selectbox("Model",df[df['Make']==make]['Model'].unique())
|
| 75 |
trim=st.selectbox("Trim",df[(df['Make']==make) & (df['Model']==model)]['Trim'].unique())
|
| 76 |
-
mileage=st.number_input("
|
| 77 |
-
car_type=st.selectbox("
|
| 78 |
-
cylinder=st.selectbox("
|
| 79 |
-
liter=st.number_input("
|
| 80 |
-
doors=st.selectbox("
|
| 81 |
-
cruise=st.radio("
|
| 82 |
-
sound=st.radio("
|
| 83 |
-
leather=st.radio("
|
| 84 |
-
if st.button("
|
| 85 |
pred=price(make,model,trim,mileage,car_type,cylinder,liter,doors,cruise,sound,leather)
|
| 86 |
|
| 87 |
st.write("11062024:Predicted Price :red_car: $",round(pred[0],2))
|
|
|
|
| 68 |
})
|
| 69 |
prediction=pipe.predict(input_data)[0]
|
| 70 |
return prediction
|
| 71 |
+
st.title("Used Car Price Estimation :red_car: @JamesWhiteCookJr90")
|
| 72 |
+
st.write("Enter feature of the car")
|
| 73 |
+
make=st.selectbox("Make",df['Make'].unique())
|
| 74 |
model=st.selectbox("Model",df[df['Make']==make]['Model'].unique())
|
| 75 |
trim=st.selectbox("Trim",df[(df['Make']==make) & (df['Model']==model)]['Trim'].unique())
|
| 76 |
+
mileage=st.number_input("Mileage",200,60000)
|
| 77 |
+
car_type=st.selectbox("Vehicle Type",df[(df['Make']==make) & (df['Model']==model) & (df['Trim']==trim )]['Type'].unique())
|
| 78 |
+
cylinder=st.selectbox("Cylinder",df['Cylinder'].unique())
|
| 79 |
+
liter=st.number_input("Engine Displacement",1,6)
|
| 80 |
+
doors=st.selectbox("Number of Doors",df['Doors'].unique())
|
| 81 |
+
cruise=st.radio("Cruise Control",[True,False])
|
| 82 |
+
sound=st.radio("Audio System",[True,False])
|
| 83 |
+
leather=st.radio("Leather Seat",[True,False])
|
| 84 |
+
if st.button("Predict"):
|
| 85 |
pred=price(make,model,trim,mileage,car_type,cylinder,liter,doors,cruise,sound,leather)
|
| 86 |
|
| 87 |
st.write("11062024:Predicted Price :red_car: $",round(pred[0],2))
|