Download README.md from MBG0903/Machine_Prediction_Model_AIEMS: direct link, hf CLI and curl.
- Browser
- Download file 3.43 kB
-
https://huggingface.co/spaces/MBG0903/Machine_Prediction_Model_AIEMS/resolve/main/README.md
- Command line
-
hf download hf://spaces/MBG0903/Machine_Prediction_Model_AIEMS/README.md
-
curl -L -o README.md https://huggingface.co/spaces/MBG0903/Machine_Prediction_Model_AIEMS/resolve/main/README.md
title: Intelligent Predictive Maintenance System
emoji: π
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
license: mit
Intelligent Predictive Maintenance System
A Streamlit-based educational prototype demonstrating collaboration between a trained Machine Learning model and Agentic AI components.
Architecture
IoT Machine Parameters
β
IoT Data Agent
β
ML Prediction Agent
β
Trained Random Forest Pipeline
β
Failure Probability + Risk Level
β
Engineering Reasoning Agent
β
Qwen/Qwen2.5-0.5B-Instruct
β
Maintenance Action Agent
β
Structured Work Order
β
Human Engineer Approval
Machine Learning Model
The application uses the pre-trained file:
predictive_maintenance_rf_pipeline.pkl
The pipeline was trained separately using the AI4I 2020 predictive-maintenance dataset.
The expected raw input features are:
- Type
- Air temperature [K]
- Process temperature [K]
- Rotational speed [rpm]
- Torque [Nm]
- Tool wear [min]
The application does not retrain the Random Forest during startup. The exported pipeline is loaded and used only for inference.
Local Reasoning Model
The engineering reasoning layer uses:
Qwen/Qwen2.5-0.5B-Instruct
The model receives:
- Current sensor readings
- Random Forest failure probability
- Random Forest prediction
- Calculated risk level
The language model explains the prediction and proposes an educational maintenance response. It does not replace the Random Forest prediction.
Agent Design
Agent 1 β IoT Data Agent
Validates and structures incoming sensor data.
Agent 2 β ML Prediction Agent
Calls the trained Random Forest pipeline as a prediction tool.
Agent 3 β Engineering Reasoning Agent
Uses Qwen to interpret the ML result and sensor readings.
Agent 4 β Maintenance Action Agent
Creates a structured predictive-maintenance work order.
Human-in-the-Loop
A qualified engineer must validate any recommendation before a real maintenance, repair, or shutdown decision.
Hugging Face Space Deployment
Create a new Hugging Face Space and choose:
SDK: Docker
Upload these files to the root of the Space:
app.py
requirements.txt
Dockerfile
README.md
predictive_maintenance_rf_pipeline.pkl
The final repository should look like:
/
βββ app.py
βββ requirements.txt
βββ Dockerfile
βββ README.md
βββ predictive_maintenance_rf_pipeline.pkl
The Docker container exposes Streamlit on port 7860, which matches the Hugging Face Space configuration.
Hardware
The Random Forest model is lightweight.
The local Qwen 0.5B model can run on CPU, but response generation may take several seconds depending on the Space hardware. CPU Upgrade or GPU hardware will provide a smoother live demonstration.
Important Model Compatibility Note
The exported Random Forest pipeline was created with scikit-learn 1.6.1, so this project pins:
scikit-learn==1.6.1
Keeping the same scikit-learn version is important when loading a Joblib/Pickle model.
Educational Disclaimer
This application is intended only for teaching and demonstration. It must not be used to make real industrial maintenance, repair, shutdown, or safety decisions without validation by qualified engineering personnel.