A web app that can predict wine quality by taking physicochemical data as input.
1.1K
This project is regularly updated in GitHub. Click hereβ to take a look.
A machine learningβpowered web application that assesses the quality of wine based on its physicochemical properties. Built with Flask, Scikit-Learn, and Pandas, this project blends oenology with machine learning to create an interactive tool for wine quality analysis. This project demonstrates how data science can be applied to the food and beverage industry to standardize quality assessment.
The Wine Quality Classifier uses a trained Machine Learning Model (optimized via GridSearchCV) to predict whether a given wine sample is of Low, Average, or High quality. The model is hosted via a Flask web app where users can input parameters (like acidity, sugar, and alcohol content) and get instant quality assessments.
Wine tasting is traditionally a subjective art, reliant on the refined palates of sommeliers. However, the chemical composition of wine plays a decisive role in its quality. This project aims to bridge the gap between chemistry and sensory experience, providing an objective, data-driven approach to classifying wine quality.
Low β 0 (Quality 3, 4)Average β 1 (Quality 5, 6)High β 2 (Quality 7, 8)The model generation pipeline (fit.py) includes the following steps:
| Step | Description |
|---|---|
| Imputation | Missing values handled using median strategy |
| Scaling | Standardized with StandardScaler |
| Augmentation | SMOTE (Synthetic Minority Over-sampling Technique) for class balance |
| Dimensionality | PCA (Principal Component Analysis) for feature reduction |
| Classifier | Optimized Estimator (Random Forest / XGBoost / KNN) found via GridSearchCV |
Final model artifacts are serialized with joblib as:
models/
βββ model.pkl
βββ columns.pkl
Wine_Research/
βββ Datasets/
β βββ WineQT.csv # Primary dataset
βββ models/
β βββ columns.pkl # List of feature names
β βββ model.pkl # Serialized trained model
βββ reports/
β βββ research.html # Static HTML report of the research notebook
βββ static/ # Static assets
β βββ script.js # Frontend interaction logic
β βββ style.css # Premium styling
βββ templates/
β βββ index.html # Main web interface
|
βββ .gitignore # gitignore file
βββ app.py # Flask application entry point
βββ fit.py # Machine learning pipeline script
βββ LICENSE # Licensing information
βββ research.py # Research and analysis script
βββ requirements.txt # Dependencies
git clone https://github.com/ByteBard58/Wine_Research.git
cd Wine_Research
pip install -r requirements.txt
python app.py
The app will start at http://127.0.0.1:5000.
Users can input physicochemical parameters such as:
The app returns the predicted quality tier (Low, Average, High) with a corresponding visual indicator.
Note: Due to the absence of front-end web development expertise and the lack of other contributors for the project, I had to resort to using AI tools (such as LLM services like ChatGPTβ’, Grokβ’, and GitHub Copilotβ’) to create a sophisticated front-end for the web app.
Sakib ( ByteBard58 )
Student | Aspiring Computer Engineer | AI & ML Enthusiast
π GitHub Profile: ByteBard58β
Thank You for taking the time to review my work. I hope you enjoyed it and found it interesting. It would mean a lot to me if you could star it on GitHub π
If you have any questions, suggestions, or anything youβd like to discuss, please donβt hesitate to reach out. You can find my contact information on my GitHub profile pageβ . Iβm all ears! π
Have a great day !
Content type
Image
Digest
sha256:7df1b96b7β¦
Size
1.1 GB
Last updated
8 months ago
docker pull bytebard101/wine_research