This project classifies restaurants based on their cuisines using a machine learning model. The model is trained using a dataset of restaurant information and is deployed using a Streamlit app.
restaurant-cuisine-classifier/
├── app.py
├── ML_Model.py
├── requirements.txt
├── README.md
├── dataset.csv
The predictive model was trained on the Restaurant Rating Dataset from Kaggle. This dataset contains various features of restaurants, such as average cost for two, price range, and votes, alongside their respective ratings. The dataset was preprocessed to handle missing values, categorical features, and normalization for better model performance.
-
Clone the repository:
git clone https://github.com/yourusername/restaurant-cuisine-classifier.git cd restaurant-cuisine-classifier
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the required packages:
pip install -r requirements.txt
1.) For Food Quality prediction in Food e-commerce
2.) small segements of the food serving websites can be improved so customers can decide which resto to choose thus this helps to improve customer acquasition cost.
-
Prepare your dataset:
- Place your dataset CSV file in the project directory and update the
file_path
intrain_model.py
.
- Place your dataset CSV file in the project directory and update the
-
Train the model:
python ML_Model.ipynb
- This script will preprocess the data, train a RandomForestClassifier, perform hyperparameter tuning, and save the best model as
restaurant_cuisine_model.pkl
and the label encoder aslabel_encoder.pkl
.
- This script will preprocess the data, train a RandomForestClassifier, perform hyperparameter tuning, and save the best model as
-
Run the Streamlit app:
streamlit run app.py
-
Interact with the app:
- Open your browser and go to the local URL provided by Streamlit.
- Input the city, price range, aggregate rating, and votes to classify the restaurant's cuisine.
Feel free to open issues or submit pull requests if you have suggestions or improvements.
This project is licensed under the MIT License.