JamesCookJr90 commited on
Commit
61b587c
·
verified ·
1 Parent(s): 5391869

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
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("Araba Fiyatı Tahmin :red_car: @drmurataltun")
72
- st.write("Arabanın özelliklerini seçin")
73
- make=st.selectbox("Marka",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("Kilometre",200,60000)
77
- car_type=st.selectbox("Tipi",df[(df['Make']==make) & (df['Model']==model) & (df['Trim']==trim )]['Type'].unique())
78
- cylinder=st.selectbox("Silindir",df['Cylinder'].unique())
79
- liter=st.number_input("Liter",1,6)
80
- doors=st.selectbox("Kapı",df['Doors'].unique())
81
- cruise=st.radio("Hız S.",[True,False])
82
- sound=st.radio("Ses Sistemi",[True,False])
83
- leather=st.radio("Deri döşeme",[True,False])
84
- if st.button("Tahmin"):
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))