WEB_DEV / README.md
Binta26's picture
Upload 8 files
43c0ec5 verified
|
Raw
History Blame Contribute Delete
1.94 kB
---
title: IrisAI - Iris Flower Classifier
emoji: 🌸
colorFrom: purple
colorTo: pink
sdk: docker
pinned: false
license: mit
short_description: ML web app to classify Iris flowers using Random Forest
---
# 🌸 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