Spaces:
Sleeping
Sleeping
Gokulnath2003
commited on
Commit
•
abd84ba
1
Parent(s):
7af233b
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ model = Pipeline(steps=[
|
|
40 |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
|
41 |
model.fit(X_train, y_train)
|
42 |
|
43 |
-
#
|
44 |
y_pred = model.predict(X_test)
|
45 |
mse = mean_squared_error(y_test, y_pred)
|
46 |
|
@@ -63,7 +63,7 @@ transmission_type = st.sidebar.selectbox('Transmission Type', ['Manual', 'Automa
|
|
63 |
fuel_type = st.sidebar.selectbox('Fuel Type', ['Petrol', 'Diesel', 'CNG', 'LPG'])
|
64 |
car_name = st.sidebar.text_input('Car Name')
|
65 |
brand = st.sidebar.text_input('Brand')
|
66 |
-
|
67 |
|
68 |
# Button to trigger the prediction
|
69 |
if st.sidebar.button('Predict Price'):
|
@@ -77,7 +77,7 @@ if st.sidebar.button('Predict Price'):
|
|
77 |
'seats': [seats],
|
78 |
'car_name': [car_name],
|
79 |
'brand': [brand],
|
80 |
-
'model': [
|
81 |
'seller_type': [seller_type],
|
82 |
'fuel_type': [fuel_type],
|
83 |
'transmission_type': [transmission_type]
|
|
|
40 |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
|
41 |
model.fit(X_train, y_train)
|
42 |
|
43 |
+
# Evaluate the model (optional, you can remove this if not needed)
|
44 |
y_pred = model.predict(X_test)
|
45 |
mse = mean_squared_error(y_test, y_pred)
|
46 |
|
|
|
63 |
fuel_type = st.sidebar.selectbox('Fuel Type', ['Petrol', 'Diesel', 'CNG', 'LPG'])
|
64 |
car_name = st.sidebar.text_input('Car Name')
|
65 |
brand = st.sidebar.text_input('Brand')
|
66 |
+
model_name = st.sidebar.text_input('Model')
|
67 |
|
68 |
# Button to trigger the prediction
|
69 |
if st.sidebar.button('Predict Price'):
|
|
|
77 |
'seats': [seats],
|
78 |
'car_name': [car_name],
|
79 |
'brand': [brand],
|
80 |
+
'model': [model_name],
|
81 |
'seller_type': [seller_type],
|
82 |
'fuel_type': [fuel_type],
|
83 |
'transmission_type': [transmission_type]
|