How chjonathan44-bit/iris-flask-predictor- works
This is a Flask Iris-species classifier with a separate model-training script. A user submits four flower measurements through the web page; the app scales them, predicts a class, and displays the species or an error. Training loads the Iris dataset, prepares and scales its features and labels, trains and evaluates a neural network, then saves the model and scaler consumed by the app. The source shows these workflows in app.py and train.py; the template’s contents and runtime behavior were not sampled.
Main entry points: app.py Request handler · train.py Data preparation · index.html Input form · iris_model.h5 Saved model
Components 12
Web interface
- Request handler
harsha/app.py - Input form
harsha/templates/index.html
Prediction
- Feature scaler
harsha/app.py - Neural classifier
harsha/app.py - Species mapping
harsha/app.py - Saved model
harsha/iris_model.h5 - Saved scaler
harsha/scaler.save
Model training
- Iris dataset
harsha/train.py - Data preparation
harsha/train.py - Network training
harsha/train.py - Model evaluation
harsha/train.py
Other components
- User
Connections 13
- User → Input form: enters measurements
- User → Request handler: submits form
harsha/app.py - Request handler → Input form: renders
harsha/app.py - Request handler → Feature scaler: scales inputs
harsha/app.py - Request handler → Neural classifier: predicts class
harsha/app.py - Request handler → Species mapping: maps class
harsha/app.py - Iris dataset → Data preparation: prepares features
harsha/train.py - Data preparation → Network training: supplies data
harsha/train.py - Network training → Model evaluation: evaluates model
harsha/train.py - Network training → Saved model: saves model
harsha/train.py - Data preparation → Saved scaler: saves scaler
harsha/train.py - Request handler → Saved model: loads model
harsha/app.py - Request handler → Saved scaler: loads scaler
harsha/app.py