Spaces:
Sleeping
Sleeping
Deploy Engine Condition Predictor
Browse files- README.md +5 -9
- requirements.txt +1 -1
- streamlit_app.py +10 -10
README.md
CHANGED
|
@@ -1,13 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
title: Engine Condition
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
-
app_file: streamlit_app.py
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
-
|
| 11 |
-
# Engine Condition Predictor
|
| 12 |
-
|
| 13 |
-
MLOps pipeline for engine condition monitoring and predictive maintenance.
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Engine Condition App
|
| 3 |
+
emoji: "🚧"
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: docker
|
|
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
+
This Space runs a Streamlit app that predicts engine condition from sensor data.
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
streamlit==1.39.0
|
|
|
|
| 2 |
pandas==2.2.2
|
| 3 |
numpy==2.0.2
|
| 4 |
scikit-learn==1.6.1
|
| 5 |
-
joblib==1.4.2
|
| 6 |
huggingface_hub==0.25.1
|
|
|
|
| 1 |
streamlit==1.39.0
|
| 2 |
+
joblib==1.4.2
|
| 3 |
pandas==2.2.2
|
| 4 |
numpy==2.0.2
|
| 5 |
scikit-learn==1.6.1
|
|
|
|
| 6 |
huggingface_hub==0.25.1
|
streamlit_app.py
CHANGED
|
@@ -8,12 +8,12 @@ import os
|
|
| 8 |
|
| 9 |
# Configuration
|
| 10 |
HF_MODEL_REPO = os.getenv("HF_MODEL_REPO", "dhani10/engine-maintenance-model")
|
| 11 |
-
MODEL_FILE = os.getenv("MODEL_FILE", "best_model.pkl")
|
| 12 |
|
| 13 |
-
# Expected features (match your training data exactly)
|
| 14 |
EXPECTED_COLS = [
|
| 15 |
-
'
|
| 16 |
-
'
|
| 17 |
]
|
| 18 |
|
| 19 |
@st.cache_resource
|
|
@@ -72,12 +72,12 @@ def main():
|
|
| 72 |
if submitted:
|
| 73 |
# Create input data with EXACT column names from training
|
| 74 |
input_data = pd.DataFrame([{
|
| 75 |
-
'
|
| 76 |
-
'
|
| 77 |
-
'
|
| 78 |
-
'
|
| 79 |
-
'
|
| 80 |
-
'
|
| 81 |
}])
|
| 82 |
|
| 83 |
try:
|
|
|
|
| 8 |
|
| 9 |
# Configuration
|
| 10 |
HF_MODEL_REPO = os.getenv("HF_MODEL_REPO", "dhani10/engine-maintenance-model")
|
| 11 |
+
MODEL_FILE = os.getenv("MODEL_FILE", "best_model.pkl")
|
| 12 |
|
| 13 |
+
# Expected features (match your training data exactly - should be snake_case)
|
| 14 |
EXPECTED_COLS = [
|
| 15 |
+
'engine_rpm', 'lub_oil_pressure', 'fuel_pressure',
|
| 16 |
+
'coolant_pressure', 'lub_oil_temp', 'coolant_temp'
|
| 17 |
]
|
| 18 |
|
| 19 |
@st.cache_resource
|
|
|
|
| 72 |
if submitted:
|
| 73 |
# Create input data with EXACT column names from training
|
| 74 |
input_data = pd.DataFrame([{
|
| 75 |
+
'engine_rpm': engine_rpm,
|
| 76 |
+
'lub_oil_pressure': lub_oil_pressure,
|
| 77 |
+
'fuel_pressure': fuel_pressure,
|
| 78 |
+
'coolant_pressure': coolant_pressure,
|
| 79 |
+
'lub_oil_temp': lub_oil_temp,
|
| 80 |
+
'coolant_temp': coolant_temp
|
| 81 |
}])
|
| 82 |
|
| 83 |
try:
|