Hermela's picture
Update README.md
1c93231 verified

A newer version of the Gradio SDK is available: 6.6.0

Upgrade
metadata
title: iris logistic regression
emoji: πŸ“š
colorFrom: red
colorTo: gray
sdk: gradio
sdk_version: 5.47.0
app_file: app.py
pinned: false

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# Iris Species Prediction

## Overview
This project uses a **logistic regression model** to predict Iris flower species (*Setosa, Versicolor, Virginica*) based on four measurements:  
- Sepal length  
- Sepal width  
- Petal length  
- Petal width  

The model, trained on the **Iris dataset**, achieves ~**100% accuracy**.  
A **Gradio interface** allows users to input measurements and get predictions with confidence scores.

---

## How to Use
1. Open the Gradio app in the Hugging Face Space.  
2. Adjust sliders for **sepal length, sepal width, petal length, and petal width** (in cm).  
3. Click **"Submit"** to see the predicted species and confidence scores.

---

## Setup
The app runs on Hugging Face Spaces with the following structure:

/iris-species-prediction-gradio/
β”œβ”€β”€ app.py
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ iris_model.joblib
β”‚   β”œβ”€β”€ scaler.joblib
β”œβ”€β”€ requirements.txt
---

## Requirements
- gradio  
- pandas  
- scikit-learn  
- joblib  

---

## Model Details
- **Dataset**: Iris dataset (150 samples, 4 features, 3 classes).  
- **Model**: Logistic Regression (multinomial, accuracy ~1.00).  
- **Files**:  
  - `iris_model.joblib` β†’ trained model  
  - `scaler.joblib` β†’ standard scaler  

---

## Deployment
- Hosted on **Hugging Face Spaces**.  
- Clone the repo, add the `models/` folder, and push to deploy.  

---

## License
MIT