This is the Historic Iris Flower type detection project I started my Machine Learning journey with. This simple project takes in an array of Petal_length, Petal_width, Sepal_length and Sepal_width and detects the breed of Iris flower('Versicolor', 'Setosa', 'Virginica')
Flower_model.pth file has been trained and tested 150 entries collected from Iris Datasets. Model is running on evaluation mode, consuming the input and predict each of flower probability. Flower with highest probabily will bw returned as Output.
##################### To run the project :
- Clone the repo
- python -m venv venv # Create a virtual environment named 'venv'
- source venv/bin/activate # Activate the virtual environment
- pip install -r requirements.txt #Install the dependencies
- uvicorn app.main:app --reload #Run the Uvicorn server
Application will be running on localhost:8000 Go to http://localhost:8000/docs to get the FastAPI swagger UI.
There are two endpoints:
- Get Hello (http://localhost:8000)
- Predict the flower (http://localhost:8000/predict) Example RequestBody : { "sepal_length": 7, "sepal_width": 2, "petal_length": 1, "petal_width": 1 }