Skip to content

🌾 DON Concentration Prediction App A machine learning-powered web application for predicting Deoxynivalenol (DON) concentration in agricultural products using spectral data.

Notifications You must be signed in to change notification settings

yessasvini23/-DON-Concentration-Prediction_-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌾 DON Concentration Prediction App

A machine learning-powered web application for predicting Deoxynivalenol (DON) concentration in agricultural products using spectral data. Built with Python, Streamlit, FastAPI, and Scikit-Learn, this project enables quick and accurate DON contamination predictions.

πŸš€ Features

βœ… User-friendly Interface – Enter spectral values and get predictions instantly βœ… Machine Learning Model – Uses a trained MLP Regressor (Neural Network) βœ… Data Preprocessing – Handles missing values, normalizes spectral features βœ… Model Evaluation – Performance measured using MAE, RMSE, and RΒ² βœ… Web Deployment – Available via Streamlit (UI) & FastAPI (API)

πŸ“‚ Project Structure

β”œβ”€β”€ mycotoxin_prediction.py # Main ML pipeline: data processing, training, evaluation β”œβ”€β”€ app.py # FastAPI backend for model inference β”œβ”€β”€ don_prediction_model.pkl # Trained model β”œβ”€β”€ scaler.pkl # StandardScaler for input normalization β”œβ”€β”€ MLE-Assignment.csv # Dataset β”œβ”€β”€ README.md # Project documentation

πŸ› οΈ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/your-username/don-prediction-app.git cd don-prediction-app

2️⃣ Install Dependencies

  pip install -r requirements.txt

3️⃣ Run the Streamlit App

 streamlit run mycotoxin_prediction.py

4️⃣ Run the FastAPI Backend

uvicorn app:app --reload

πŸ“Š Model Performance

Metric Score Mean Absolute Error (MAE): 3342.7450 Root Mean Squared Error (RMSE): 9834.3624 RΒ² Score: 0.6540 write this as a table

πŸ“’ API Usage

Once the FastAPI backend is running, send a POST request to: http://localhost:8501/predict/

Example Request (JSON)

{ "features": [0.1, 0.5, 0.3, 0.8, 0.9,] }

Example Response

{ "predicted_don_concentration": 3.45 }

πŸ—οΈ Future Improvements

πŸ” Hyperparameter tuning for improved model accuracy πŸ“ˆ Visualization dashboards for better insights ☁️ Cloud deployment on AWS/GCP

πŸ–₯️ Author

πŸ‘©β€πŸ’» Sudarshanam Yessasvini πŸ“§ Email: your.yessasvini.s@gmail.com

πŸ”— Deployment URLs

Local URL: http://localhost:8501 Network URL: http://192.168.1.2:8501 (Change this according to your network configuration)

Results Vs Image

About

🌾 DON Concentration Prediction App A machine learning-powered web application for predicting Deoxynivalenol (DON) concentration in agricultural products using spectral data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages