Skip to content

Create, train and save a sequential neural network model and use a streamlit app to predict wine scores

Notifications You must be signed in to change notification settings

runtime/winescorepredictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wine Predictor

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

Environments

venv

Use venv to launch a python environment 3.8 or higher

source venv/bin/activate

conda

or use conda to launch a python environment 3.8 or higher

source venv/bin/activate

Installation

Use the package manager pip to install dependencies.

pip install tensorflow
pip install streamlit

Running the App

using terminal

#run python env locally
cd winepredictor
python main.py

after main.py application has compiled run:

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

using an IDE:

import streamlit as st
import tensorflow as tf
from pathlib import Path
import pickle
run main.py

streamlit will launch automatically. view the app in the browser:

http://localhost:8501/

Usage

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

Re-Usage

To create and train a new model

change training data

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

Contributing

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

About

Create, train and save a sequential neural network model and use a streamlit app to predict wine scores

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages