Skip to content

ymbawa26/FoodWasteApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Food Waste Predictor

Dashboard preview

Neural Food Waste Predictor is a full-stack machine learning dashboard for estimating daily food waste from operational and environmental inputs.

The project combines a React frontend, a FastAPI backend, and an MLPRegressor model so users can explore both historical data and live inference from one interface.

Try the browser demo

Open in GitHub Codespaces

Why This Project Exists

Food waste is expensive, environmentally harmful, and often driven by patterns that operators can only see after the fact.

This project turns that problem into a product flow:

  • visualize historical waste behavior
  • retrain a model from generated operational data
  • change input conditions live
  • get an immediate waste prediction from the API

Stack

  • Frontend: React, TypeScript, Vite, Recharts
  • Backend: Python, FastAPI, Uvicorn
  • ML: scikit-learn MLPRegressor, NumPy, pandas
  • Styling: custom CSS

How To Try It

Option 1: Run locally

Start the backend:

cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python train_model.py
uvicorn main:app --reload

In a second terminal, start the frontend:

cd frontend
npm install
npm run dev

Then open http://localhost:5173.

Option 2: Run in Codespaces

  1. Click the Codespaces badge above.
  2. Open two terminals.
  3. Start the backend with the commands above.
  4. Start the frontend with the commands above.
  5. Open the forwarded Vite port.

Option 3: Use the browser demo

If you want a fast product walkthrough from another computer, use the public browser demo above.

That hosted demo runs a deterministic client-side version of the waste logic for easy access, while the full local repo still contains the React frontend, FastAPI API, and trained scikit-learn model artifact.

What Is In The Repo

  • frontend/ dashboard UI and charts
  • backend/main.py FastAPI inference API
  • backend/train_model.py synthetic data generation and model training
  • backend/model.joblib trained model artifact
  • backend/historical_waste.csv demo dataset

Current Status

This repository now has a lightweight public browser demo plus a fuller local stack implementation.

The browser demo is the easiest public entry point, while the local repo remains the more complete engineering version.

About

Food waste prediction dashboard built with React, FastAPI, and a neural-network regressor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors