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.
β 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)
βββ 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
git clone https://github.com/your-username/don-prediction-app.git cd don-prediction-app
pip install -r requirements.txt
streamlit run mycotoxin_prediction.py
uvicorn app:app --reload
Metric Score Mean Absolute Error (MAE): 3342.7450 Root Mean Squared Error (RMSE): 9834.3624 RΒ² Score: 0.6540 write this as a table
Once the FastAPI backend is running, send a POST request to: http://localhost:8501/predict/
{ "features": [0.1, 0.5, 0.3, 0.8, 0.9,] }
{ "predicted_don_concentration": 3.45 }
π Hyperparameter tuning for improved model accuracy π Visualization dashboards for better insights βοΈ Cloud deployment on AWS/GCP
π©βπ» Sudarshanam Yessasvini π§ Email: your.yessasvini.s@gmail.com
Local URL: http://localhost:8501 Network URL: http://192.168.1.2:8501 (Change this according to your network configuration)