# 🌸 IrisAI — Flask ML Web Application A machine learning web app that classifies Iris flowers using a Random Forest model, built with Flask. ## 📁 Project Structure ``` ml_flask_app/ ├── app.py # Main Flask application ├── train_model.py # Model training script ├── requirements.txt # Python dependencies ├── users.db # SQLite database (auto-created) ├── model/ │ ├── iris_model.pkl # Trained Random Forest model │ ├── scaler.pkl # StandardScaler │ └── class_names.pkl # Class label names └── templates/ ├── base.html # Shared layout ├── login.html # Login page ├── register.html # Registration page └── predict.html # Prediction form & results ``` ## 🚀 Setup & Run ```bash # 1. Install dependencies pip install -r requirements.txt # 2. (Optional) Retrain the model python train_model.py # 3. Run the app python app.py ``` Then open http://127.0.0.1:5000 in your browser. ## 🔑 Default Login - **Username:** `admin` - **Password:** `password123` Or register your own account at `/register`. ## 🤖 Model Details | Item | Value | |------|-------| | Dataset | UCI Iris (150 samples, 4 features) | | Algorithm | Random Forest (100 trees) | | Accuracy | 90% on held-out test set | | Classes | setosa, versicolor, virginica | | Source | https://archive.ics.uci.edu/dataset/53/iris | ## ✨ Features - 🔐 Login & registration with SHA-256 password hashing - 📊 Real-time flower classification with confidence scores - 📋 Prediction history per user (stored in SQLite) - 💡 Quick-fill example inputs for each species - 📱 Responsive design