Job6742/Raw_Material_Predictor
0
title: Raw Material Predictive Model emoji: ⚙️ colorFrom: orange colorTo: yellow sdk: docker pinned: true ---
⚙️ Raw Material Predictive Model
<div align="center">
🌐 👉 CLICK HERE — OPEN LIVE APP
🔗 https://huggingface.co/spaces/Job6742/raw-material-predictor
ML-powered inventory intelligence dashboard — works in any browser, no installation needed
   
</div>
📌 About This Project
A full-stack AI web application that monitors raw material stock levels in real time, predicts how long current stock will last using machine learning, and raises automatic alerts when materials are running low or unused.
🔗 Full source code, documentation, and desktop (.exe) version available on GitHub: [github.com/ponjose004/Raw-Material-Prediction](https://github.com/ponjose004/Raw-Material-Prediction)
✅ Features
🧠 How the ML Works
- Reads each material's daily stock Excel file
- Filters to last 10 months of non-zero consumption data
- Creates 21 lag features from the
Totalusage column (past 21 days as memory) - Trains a HistGradientBoostingRegressor — a fast, robust gradient boosting model
- Predicts tomorrow's daily consumption
- Divides current stock by prediction → days remaining
- Applies ±30% range for high / normal / low consumption scenarios
🗂️ Dataset Format
Each .xlsx file in the raw/ folder follows this structure:
⚠️ The Excel files bundled here contain randomly generated sample data only. Real data is confidential and not included.
💻 Run Locally
# Clone from GitHub
git clone https://github.com/ponjose004/Raw-Material-Prediction.git
cd Raw-Material-Prediction
# Install dependencies
pip install -r requirements.txt
# Run
python app.py
# Open http://localhost:7860📦 A standalone Windows .exe download is also available on the GitHub Releases page
🧰 Tech Stack
🔗 Links
👤 Author
ponjose004
- 🐙 GitHub: @ponjose004
- 🤗 Hugging Face: @Job6742
This Space is deployed via Docker. The Flask server runs on port 7860 as required by Hugging Face Spaces.
