This project is a web application that predicts the selling price of a car based on various features like the car's present price, distance driven, fuel type, seller type, transmission type, number of owners, and the year it was purchased. The application is built using Streamlit and a trained machine learning model.
-
Clone the repository:
git clone https://github.com/your-username/car-price-prediction.git cd car-price-prediction
-
Create a virtual environment:
python -m venv myenv
-
Activate the virtual environment:
- On Windows:
myenv\Scripts\activate
- On macOS/Linux:
source myenv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Train the model (if not already trained):
python train_model.py
-
Run the Streamlit application:
streamlit run app.py
- Open your browser and go to
https://car-price-prediction-nb.streamlit.app/
. - Enter the required information about the car:
- Name of the Car
- Current Price of the Car (in Lakhs)
- Distance Driven (kms)
- Fuel Type (Petrol, Diesel, CNG)
- Dealer or Individual
- Transmission (Manual, Automatic)
- Number of Owners
- Year of Purchase
- Click on the "Predict" button to get the predicted selling price of the car.
The model is trained using a RandomForestRegressor on the provided dataset. To train the model:
- Load your dataset (e.g.,
car_data.csv
). - Run the
app.py
script to train and save the model:python app.py
- Predicts the selling price of a car based on user input.
- Interactive and user-friendly interface built with Streamlit.
- Supports various car features for a comprehensive prediction.
- Python 3.x
- joblib==1.2.0
- scikit-learn==1.3.2
- streamlit==1.22.0
- pandas
- numpy
- datetime
Contributions are welcome! Please fork this repository and open a pull request to add more features or improve the code.