Lucky Sharma
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,4 +8,59 @@ pinned: false
|
|
| 8 |
license: apache-2.0
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
license: apache-2.0
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Iris Flower Detection Web Application
|
| 12 |
+
|
| 13 |
+
This is a simple Flask web application that uses a machine learning model to predict the species of iris flowers based on measurements.
|
| 14 |
+
|
| 15 |
+
## Files and Structure
|
| 16 |
+
|
| 17 |
+
- `app.py` - The main Flask application
|
| 18 |
+
- `iris_model.pkl` / `new_iris_model.pkl` - The trained machine learning model
|
| 19 |
+
- `templates/` - Folder containing HTML templates
|
| 20 |
+
- `form.html` - Input form for flower measurements
|
| 21 |
+
- `result.html` - Page showing prediction results
|
| 22 |
+
- `create_new_model.py` - Script to create a fresh model if needed
|
| 23 |
+
- `test_app.py` - Script to test the application functionality
|
| 24 |
+
- `run_app.bat` - Windows batch file to easily run the application
|
| 25 |
+
|
| 26 |
+
## How to Run
|
| 27 |
+
|
| 28 |
+
1. Double-click on `run_app.bat` or run `python app.py` in your terminal
|
| 29 |
+
2. Open your web browser and go to http://127.0.0.1:5000
|
| 30 |
+
3. Enter the flower measurements and click "Predict Flower Species"
|
| 31 |
+
|
| 32 |
+
## Sample Measurements
|
| 33 |
+
|
| 34 |
+
### Iris Setosa
|
| 35 |
+
|
| 36 |
+
- Sepal Length: 5.1 cm
|
| 37 |
+
- Sepal Width: 3.5 cm
|
| 38 |
+
- Petal Length: 1.4 cm
|
| 39 |
+
- Petal Width: 0.2 cm
|
| 40 |
+
|
| 41 |
+
### Iris Versicolor
|
| 42 |
+
|
| 43 |
+
- Sepal Length: 6.0 cm
|
| 44 |
+
- Sepal Width: 2.7 cm
|
| 45 |
+
- Petal Length: 4.2 cm
|
| 46 |
+
- Petal Width: 1.3 cm
|
| 47 |
+
|
| 48 |
+
### Iris Virginica
|
| 49 |
+
|
| 50 |
+
- Sepal Length: 6.8 cm
|
| 51 |
+
- Sepal Width: 3.0 cm
|
| 52 |
+
- Petal Length: 5.5 cm
|
| 53 |
+
- Petal Width: 2.1 cm
|
| 54 |
+
|
| 55 |
+
## Troubleshooting
|
| 56 |
+
|
| 57 |
+
If you encounter issues:
|
| 58 |
+
|
| 59 |
+
1. Run `python test_app.py` to verify the model is working correctly
|
| 60 |
+
2. Check that you have all the required Python packages installed:
|
| 61 |
+
- Flask
|
| 62 |
+
- scikit-learn
|
| 63 |
+
- joblib
|
| 64 |
+
- numpy
|
| 65 |
+
3. Try generating a new model with `python create_new_model.py`
|
| 66 |
+
|