hanifekaptan
commited on
Commit
•
7346cd4
1
Parent(s):
54176c5
Update app.py
Browse files
app.py
CHANGED
@@ -47,13 +47,13 @@ def price(mileage, make, model, trim, type, cylinder, liter, doors, cruise, soun
|
|
47 |
prediction = pipe.predict(input_data)[0]
|
48 |
return prediction
|
49 |
|
50 |
-
st.title("Used Car Price Prediction red_car")
|
51 |
st.write("Please select the car features.")
|
52 |
mileage = st.number_input("Mileage", 100, 200000)
|
53 |
make = st.selectbox("Brand", data["Make"].unique())
|
54 |
model = st.selectbox("Model", data[data["Make"] == make]["Model"].unique())
|
55 |
trim = st.selectbox("Trim", data[(data["Make"] == make) & (data["Model"] == model)]["Trim"].unique())
|
56 |
-
car_type = st.selectbox("Type", data[(
|
57 |
cylinder = st.selectbox("Cylinder", data["Cylinder"].unique())
|
58 |
liter = st.number_input("Fuel Volume", 1, 10)
|
59 |
doors = st.selectbox("Doors", data['Doors'].unique())
|
@@ -62,4 +62,4 @@ sound = st.radio("Sound System", [True, False])
|
|
62 |
leather = st.radio("Leather", [True, False])
|
63 |
if st.button("Prediction"):
|
64 |
pred = price(mileage, make, model, trim, car_type, cylinder, liter, doors, cruise, sound, leather)
|
65 |
-
st.write("Price ($):", round(pred, 2))
|
|
|
47 |
prediction = pipe.predict(input_data)[0]
|
48 |
return prediction
|
49 |
|
50 |
+
st.title("Used Car Price Prediction :red_car:")
|
51 |
st.write("Please select the car features.")
|
52 |
mileage = st.number_input("Mileage", 100, 200000)
|
53 |
make = st.selectbox("Brand", data["Make"].unique())
|
54 |
model = st.selectbox("Model", data[data["Make"] == make]["Model"].unique())
|
55 |
trim = st.selectbox("Trim", data[(data["Make"] == make) & (data["Model"] == model)]["Trim"].unique())
|
56 |
+
car_type = st.selectbox("Type", data[(data["Make"] == make) & (data["Model"] == model) & (data["Trim"] == trim)]["Type"].unique())
|
57 |
cylinder = st.selectbox("Cylinder", data["Cylinder"].unique())
|
58 |
liter = st.number_input("Fuel Volume", 1, 10)
|
59 |
doors = st.selectbox("Doors", data['Doors'].unique())
|
|
|
62 |
leather = st.radio("Leather", [True, False])
|
63 |
if st.button("Prediction"):
|
64 |
pred = price(mileage, make, model, trim, car_type, cylinder, liter, doors, cruise, sound, leather)
|
65 |
+
st.write("Price ($):", round(pred, 2))
|