Wine Predictor is an AI applet that anyone can use to predict the rating of a wine if they have the characteristic data for the wine as it was defined in the training data. The predictor uses a trained sequential neural network model to make the predictions. The UI was created using streamlit
Use venv to launch a python environment 3.8 or higher
source venv/bin/activate
or use conda to launch a python environment 3.8 or higher
source venv/bin/activate
Use the package manager pip to install dependencies.
pip install tensorflow
pip install streamlit
#run python env locally
cd winepredictor
python main.py
streamlit run main.py
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8502
Network URL: http://192.168.1.153:8502
import streamlit as st
import tensorflow as tf
from pathlib import Path
import pickle
run main.py
http://localhost:8501/
Enter in the attributes on the side panel and hit the predict button to get a predicted quality
characteristics:
- fixed_acidity
- volatile_acidity
- citric_acidity
- residue_sugar
- chlorides
- free_sulfur_dioxide
- total_sulfur_dioxide
- density
- ph
- sulphates
- alcohol
Open file: model_train_save.py
and update path to new csv
data_training_file_path = "training_data/wine_quality.csv"
#### saved models:
models/wine_quality.h5
Pull requests are welcomed but please open an issue first to discuss what you would like to add or change. This is mostly for demo purposes to show how to create, train and save a sequential neural network, reload it and use it in a streamlit application