Upload 54 files
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +5 -0
- .gitignore +0 -0
- .python-version +1 -0
- .vscode/settings.json +4 -0
- LICENSE +21 -0
- README.md +18 -3
- app.py +113 -0
- backend/api/__init__.py +0 -0
- backend/api/__pycache__/__init__.cpython-313.pyc +0 -0
- backend/api/__pycache__/main.cpython-313.pyc +0 -0
- backend/api/main.py +21 -0
- backend/app/__init__.py +0 -0
- backend/app/__pycache__/__init__.cpython-313.pyc +0 -0
- backend/app/__pycache__/config.cpython-313.pyc +0 -0
- backend/app/__pycache__/model_loader.cpython-313.pyc +0 -0
- backend/app/__pycache__/predictor.cpython-313.pyc +0 -0
- backend/app/__pycache__/schemas.cpython-313.pyc +0 -0
- backend/app/config.py +1 -0
- backend/app/model_loader.py +9 -0
- backend/app/predictor.py +30 -0
- backend/app/schemas.py +28 -0
- backend/data/processed/merged_df_all12k_combined.csv +0 -0
- backend/data/raw/index.csv +0 -0
- backend/data/raw/merged_df_all12.csv +0 -0
- backend/data/raw/surface.csv +0 -0
- backend/data_copy/index data info.pdf +3 -0
- backend/data_copy/indices data.csv +0 -0
- backend/data_copy/merged_df_all12.csv +0 -0
- backend/data_copy/merged_df_all12k_combined.csv +0 -0
- backend/data_copy/surface data info.pdf +0 -0
- backend/data_copy/surface_data.csv +0 -0
- backend/experiments/Experiment.ipynb +0 -0
- backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/MLmodel +25 -0
- backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/conda.yaml +22 -0
- backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/model.skops +3 -0
- backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/python_env.yaml +7 -0
- backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/requirements.txt +15 -0
- backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/MLmodel +25 -0
- backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/conda.yaml +22 -0
- backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/model.skops +3 -0
- backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/python_env.yaml +7 -0
- backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/requirements.txt +15 -0
- backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/MLmodel +25 -0
- backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/conda.yaml +22 -0
- backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/model.skops +3 -0
- backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/python_env.yaml +7 -0
- backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/requirements.txt +15 -0
- backend/model/Random_Forest_best_model.pkl +3 -0
- backend/requirements.txt +6 -0
- frontend/local-requirements.txt +17 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
backend/data_copy/index[[:space:]]data[[:space:]]info.pdf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/model.skops filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/model.skops filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/model.skops filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
mlflow.db filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
File without changes
|
.python-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
3.10
|
.vscode/settings.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"python-envs.defaultEnvManager": "ms-python.python:conda",
|
| 3 |
+
"python-envs.defaultPackageManager": "ms-python.python:conda"
|
| 4 |
+
}
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Mohd Zaheeruddin
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Thunderstorm-Forecasting-with-MLFlow-Tracking
|
| 2 |
+
Develop a robust thunderstorm forecasting system leveraging machine learning models and MLflow for tracking experiments. This project integrates data preparation, model training, hyperparameter tuning, and deployment to predict thunderstorm occurrences, enhancing weather prediction accuracy and enabling proactive safety measures.
|
| 3 |
+
|
| 4 |
+
## Project Preview
|
| 5 |
+
|
| 6 |
+
<p align="center">
|
| 7 |
+
<img src="https://career-platform-may-2026.s3.ap-south-1.amazonaws.com/krishnaik.in/media/project_banners/-thunderstorm-forecasting-e06ae75080c962a98a002d0c969a1dde.jpg"
|
| 8 |
+
alt="Project Preview"
|
| 9 |
+
width="600" />
|
| 10 |
+
</p>
|
| 11 |
+
|
| 12 |
+
## System Architecture
|
| 13 |
+
|
| 14 |
+
<p align="center">
|
| 15 |
+
<img src="https://career-platform-may-2026.s3.ap-south-1.amazonaws.com/krishnaik.in/media/project_architecture_diagrams/Excalidraw_Whiteboard_-_Google_Chrome_1_5_2026_9_11_54_PM.png"
|
| 16 |
+
alt="System Architecture"
|
| 17 |
+
width="600" />
|
| 18 |
+
</p>
|
app.py
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
+
import joblib
|
| 4 |
+
|
| 5 |
+
# Set modern wide layout configuration
|
| 6 |
+
st.set_page_config(
|
| 7 |
+
page_title="Thunderstorm Predictor",
|
| 8 |
+
page_icon="🌦",
|
| 9 |
+
layout="wide"
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
MODEL_PATH = 'model/Random_Forest_best_model.pkl'
|
| 13 |
+
|
| 14 |
+
@st.cache_resource
|
| 15 |
+
def load_local_model():
|
| 16 |
+
"""Caches the model initialization to prevent slow page reloads."""
|
| 17 |
+
try:
|
| 18 |
+
return joblib.load(MODEL_PATH)
|
| 19 |
+
except FileNotFoundError:
|
| 20 |
+
st.error(f"❌ Could not find the model file at `{MODEL_PATH}`. Please check your folder structure.")
|
| 21 |
+
return None
|
| 22 |
+
|
| 23 |
+
model = load_local_model()
|
| 24 |
+
|
| 25 |
+
st.title("🌦 Thunderstorm Prediction App")
|
| 26 |
+
st.markdown("Enter atmospheric metrics below to predict the likelihood of real-time Convective Thunderstorm (TH) occurrences.")
|
| 27 |
+
st.markdown("---")
|
| 28 |
+
|
| 29 |
+
# 1. SIDEBAR DEMO PRESETS FOR QUICK TESTING
|
| 30 |
+
st.sidebar.header("💡 Quick-Load Test Profiles")
|
| 31 |
+
st.sidebar.write("Click a button below to instantly populate realistic meteorological boundaries into your dashboard:")
|
| 32 |
+
|
| 33 |
+
clear_sky_preset = {
|
| 34 |
+
"sweat": 91.2, "k": -1.4, "tt": 24.7, "stability": 25.8,
|
| 35 |
+
"moisture": 22.8, "convective": 0.0, "temp_press": 5636.0, "profile": 993.98
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
severe_storm_preset = {
|
| 39 |
+
"sweat": 420.0, "k": 38.0, "tt": 56.0, "stability": -10.0, # Negative means massive rising instability
|
| 40 |
+
"moisture": 55.0, "convective": 2500.0, "temp_press": 5700.0, "profile": 900.00
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
# Keep state persistent when user triggers a selection change
|
| 44 |
+
if "form_data" not in st.session_state:
|
| 45 |
+
st.session_state.form_data = clear_sky_preset
|
| 46 |
+
|
| 47 |
+
if st.sidebar.button("☀️ Populate Clear Skies Profile"):
|
| 48 |
+
st.session_state.form_data = clear_sky_preset
|
| 49 |
+
|
| 50 |
+
if st.sidebar.button("🚨 Populate Severe Thunderstorm Profile"):
|
| 51 |
+
st.session_state.form_data = severe_storm_preset
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
# 2. TWO-COLUMN USER INPUT DESIGN
|
| 55 |
+
st.subheader("📊 Ambient Atmospheric Parameters")
|
| 56 |
+
col1, col2 = st.columns(2)
|
| 57 |
+
|
| 58 |
+
with col1:
|
| 59 |
+
st.markdown("### 🌡️ Thermal & Stability Indices")
|
| 60 |
+
SWEAT_index = st.number_input("SWEAT Index", value=st.session_state.form_data["sweat"], help="Severe Weather Threat Index baseline.")
|
| 61 |
+
K_index = st.number_input("K Index", value=st.session_state.form_data["k"], help="Vertical temperature lapse tracking point.")
|
| 62 |
+
Totals_totals_index = st.number_input("Totals Totals Index", value=st.session_state.form_data["tt"], help="Static stability framework element.")
|
| 63 |
+
Environmental_Stability = st.number_input("Environmental Stability", value=st.session_state.form_data["stability"], help="Calculated using Showalter + Lifted. Highly negative values imply extreme updraft potential.")
|
| 64 |
+
|
| 65 |
+
with col2:
|
| 66 |
+
st.markdown("### 💧 Moisture & Geometric Profiles")
|
| 67 |
+
Moisture_Indices = st.number_input("Moisture Indices", value=st.session_state.form_data["moisture"], help="Precipitable water depth saturation calculation.")
|
| 68 |
+
Convective_Potential = st.number_input("Convective Potential", value=st.session_state.form_data["convective"], help="Calculated using CAPE + CINE energy thresholds.")
|
| 69 |
+
Temperature_Pressure = st.number_input("Temperature Pressure", value=st.session_state.form_data["temp_press"], help="1000-500 hPa Thickness index framework metric.")
|
| 70 |
+
Moisture_Temperature_Profiles = st.number_input("Moisture Temperature Profiles", value=st.session_state.form_data["profile"], help="Pressure at Lifted Condensation Level (PLCL).")
|
| 71 |
+
|
| 72 |
+
st.markdown("---")
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
# 3. DIRECT RUNTIME MODEL INFERENCE AND FEEDBACK BUILD
|
| 76 |
+
if st.button("🚀 Run Convective Thunderstorm Prediction", use_container_width=True):
|
| 77 |
+
if model is not None:
|
| 78 |
+
# Create input DataFrame matching your exact process pipeline sequence
|
| 79 |
+
input_df = pd.DataFrame([{
|
| 80 |
+
"SWEAT index": SWEAT_index,
|
| 81 |
+
"K index": K_index,
|
| 82 |
+
"Totals totals index": Totals_totals_index,
|
| 83 |
+
"Environmental_Stability": Environmental_Stability,
|
| 84 |
+
"Moisture_Indices": Moisture_Indices,
|
| 85 |
+
"Convective_Potential": Convective_Potential,
|
| 86 |
+
"Temperature_Pressure": Temperature_Pressure,
|
| 87 |
+
"Moisture_Temperature_Profiles": Moisture_Temperature_Profiles
|
| 88 |
+
}])
|
| 89 |
+
|
| 90 |
+
try:
|
| 91 |
+
prediction = int(model.predict(input_df)[0])
|
| 92 |
+
probability = float(model.predict_proba(input_df)[0][1])
|
| 93 |
+
|
| 94 |
+
st.subheader("🎯 Model Execution Analysis")
|
| 95 |
+
out_col1, out_col2 = st.columns(2)
|
| 96 |
+
|
| 97 |
+
with out_col1:
|
| 98 |
+
if prediction == 1:
|
| 99 |
+
st.error("🚨 THUNDERSTORM DETECTED / CONVECTIVE CONDITIONS MET")
|
| 100 |
+
else:
|
| 101 |
+
st.success("☀️ CLEAR WEATHER / NO CONVECTIVE THREAT")
|
| 102 |
+
|
| 103 |
+
st.metric(label="Target Class Output (TH)", value=f"Class {prediction}")
|
| 104 |
+
|
| 105 |
+
with out_col2:
|
| 106 |
+
st.write(f"**Convective Saturation Confidence:** {probability * 100:.2f}%")
|
| 107 |
+
st.progress(probability)
|
| 108 |
+
st.caption("Probability threshold marker: Classification triggers class 1 above 50.00%.")
|
| 109 |
+
|
| 110 |
+
except Exception as e:
|
| 111 |
+
st.error("⚠️ Model Matrix Dimensions Do Not Match.")
|
| 112 |
+
st.markdown(f"Your model failed execution because it expects a different number of columns. "
|
| 113 |
+
f"**Underlying System Exception:** `{str(e)}`")
|
backend/api/__init__.py
ADDED
|
File without changes
|
backend/api/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (204 Bytes). View file
|
|
|
backend/api/__pycache__/main.cpython-313.pyc
ADDED
|
Binary file (960 Bytes). View file
|
|
|
backend/api/main.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## backend code
|
| 2 |
+
|
| 3 |
+
from fastapi import FastAPI
|
| 4 |
+
from app.schemas import WeatherInput
|
| 5 |
+
from app.predictor import predict_weather
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
app = FastAPI(title="Thunderstrom Prediction API")
|
| 9 |
+
|
| 10 |
+
# to ensure app is running
|
| 11 |
+
@app.get("/")
|
| 12 |
+
def home():
|
| 13 |
+
return {"message": "Weather Prediction API is running"}
|
| 14 |
+
|
| 15 |
+
# microservice
|
| 16 |
+
|
| 17 |
+
@app.post("/predict")
|
| 18 |
+
def predict(data: WeatherInput):
|
| 19 |
+
features = data.to_list()
|
| 20 |
+
result = predict_weather(features) # prob , pred
|
| 21 |
+
return result
|
backend/app/__init__.py
ADDED
|
File without changes
|
backend/app/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (204 Bytes). View file
|
|
|
backend/app/__pycache__/config.cpython-313.pyc
ADDED
|
Binary file (256 Bytes). View file
|
|
|
backend/app/__pycache__/model_loader.cpython-313.pyc
ADDED
|
Binary file (627 Bytes). View file
|
|
|
backend/app/__pycache__/predictor.cpython-313.pyc
ADDED
|
Binary file (1.24 kB). View file
|
|
|
backend/app/__pycache__/schemas.cpython-313.pyc
ADDED
|
Binary file (1.25 kB). View file
|
|
|
backend/app/config.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
MODEL_PATH = 'model/Random_Forest_best_model.pkl'
|
backend/app/model_loader.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import joblib
|
| 2 |
+
from app.config import MODEL_PATH
|
| 3 |
+
|
| 4 |
+
def load_model():
|
| 5 |
+
with open(MODEL_PATH, "rb") as f:
|
| 6 |
+
model = joblib.load(f)
|
| 7 |
+
return model
|
| 8 |
+
|
| 9 |
+
model = load_model() # Singleton loaded once
|
backend/app/predictor.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
from app.model_loader import model
|
| 3 |
+
|
| 4 |
+
# Exact columns and sequence your model expects
|
| 5 |
+
FEATURE_COLUMNS = [
|
| 6 |
+
"SWEAT index",
|
| 7 |
+
"K index",
|
| 8 |
+
"Totals totals index",
|
| 9 |
+
"Environmental_Stability",
|
| 10 |
+
"Moisture_Indices",
|
| 11 |
+
"Convective_Potential",
|
| 12 |
+
"Temperature_Pressure",
|
| 13 |
+
"Moisture_Temperature_Profiles"
|
| 14 |
+
]
|
| 15 |
+
|
| 16 |
+
def predict_weather(features: list):
|
| 17 |
+
"""
|
| 18 |
+
Accepts a clean, flat list of numbers, builds a proper DataFrame,
|
| 19 |
+
and returns predictions.
|
| 20 |
+
"""
|
| 21 |
+
# Create the DataFrame safely from a 2D list format
|
| 22 |
+
df = pd.DataFrame([features], columns=FEATURE_COLUMNS)
|
| 23 |
+
|
| 24 |
+
prediction = model.predict(df)
|
| 25 |
+
proba = model.predict_proba(df)[:, 1] if hasattr(model, "predict_proba") else None
|
| 26 |
+
|
| 27 |
+
return {
|
| 28 |
+
"prediction": int(prediction[0]),
|
| 29 |
+
"probability": float(proba[0]) if proba is not None else None
|
| 30 |
+
}
|
backend/app/schemas.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pydantic import BaseModel
|
| 2 |
+
from typing import List
|
| 3 |
+
|
| 4 |
+
# to make sure we are accepting , what we should
|
| 5 |
+
|
| 6 |
+
# structred format to accept input
|
| 7 |
+
|
| 8 |
+
class WeatherInput(BaseModel):
|
| 9 |
+
SWEAT_index: float
|
| 10 |
+
K_index: float
|
| 11 |
+
Totals_totals_index: float
|
| 12 |
+
Environmental_Stability: float
|
| 13 |
+
Moisture_Indices: float
|
| 14 |
+
Convective_Potential: float
|
| 15 |
+
Temperature_Pressure: float
|
| 16 |
+
Moisture_Temperature_Profiles: float
|
| 17 |
+
|
| 18 |
+
def to_list(self):
|
| 19 |
+
return [
|
| 20 |
+
self.SWEAT_index,
|
| 21 |
+
self.K_index,
|
| 22 |
+
self.Totals_totals_index,
|
| 23 |
+
self.Environmental_Stability,
|
| 24 |
+
self.Moisture_Indices,
|
| 25 |
+
self.Convective_Potential,
|
| 26 |
+
self.Temperature_Pressure,
|
| 27 |
+
self.Moisture_Temperature_Profiles
|
| 28 |
+
]
|
backend/data/processed/merged_df_all12k_combined.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/data/raw/index.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/data/raw/merged_df_all12.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/data/raw/surface.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/data_copy/index data info.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e73e436d0fc0c985f11f805066d86f1039b0784591182219dd3b0dab703e10a
|
| 3 |
+
size 379963
|
backend/data_copy/indices data.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/data_copy/merged_df_all12.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/data_copy/merged_df_all12k_combined.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/data_copy/surface data info.pdf
ADDED
|
Binary file (18.9 kB). View file
|
|
|
backend/data_copy/surface_data.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/experiments/Experiment.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/MLmodel
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
artifact_path: mlflow-artifacts:/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts
|
| 2 |
+
flavors:
|
| 3 |
+
python_function:
|
| 4 |
+
env:
|
| 5 |
+
conda: conda.yaml
|
| 6 |
+
virtualenv: python_env.yaml
|
| 7 |
+
loader_module: mlflow.sklearn
|
| 8 |
+
model_path: model.skops
|
| 9 |
+
predict_fn: predict
|
| 10 |
+
python_version: 3.13.9
|
| 11 |
+
sklearn:
|
| 12 |
+
code: null
|
| 13 |
+
pickled_model: model.skops
|
| 14 |
+
serialization_format: skops
|
| 15 |
+
sklearn_version: 1.7.2
|
| 16 |
+
skops_trusted_types:
|
| 17 |
+
- sklearn.metrics._dist_metrics.EuclideanDistance64
|
| 18 |
+
- sklearn.neighbors._kd_tree.KDTree
|
| 19 |
+
mlflow_version: 3.15.0
|
| 20 |
+
model_id: m-7928ac27e9b64c108f8770eaedd564c6
|
| 21 |
+
model_size_bytes: 262419
|
| 22 |
+
model_uuid: m-7928ac27e9b64c108f8770eaedd564c6
|
| 23 |
+
prompts: null
|
| 24 |
+
run_id: bab5a9f324084689a423d8da7feddb36
|
| 25 |
+
utc_time_created: '2026-08-02 12:48:32.865395'
|
backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/conda.yaml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
channels:
|
| 2 |
+
- conda-forge
|
| 3 |
+
dependencies:
|
| 4 |
+
- python=3.13.9
|
| 5 |
+
- pip<=25.3
|
| 6 |
+
- pip:
|
| 7 |
+
- mlflow==3.15.0
|
| 8 |
+
- bottleneck==1.4.2
|
| 9 |
+
- dask==2025.11.0
|
| 10 |
+
- lz4==4.4.5
|
| 11 |
+
- numpy==2.3.5
|
| 12 |
+
- numpydoc==1.9.0
|
| 13 |
+
- pandas==2.3.3
|
| 14 |
+
- psutil==7.0.0
|
| 15 |
+
- pyarrow==21.0.0
|
| 16 |
+
- pytest==8.4.2
|
| 17 |
+
- scikit-learn==1.7.2
|
| 18 |
+
- scipy==1.16.3
|
| 19 |
+
- skops==0.14.0
|
| 20 |
+
- tblib==3.1.0
|
| 21 |
+
- xarray==2025.10.1
|
| 22 |
+
name: mlflow-env
|
backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/model.skops
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d88454c33d283930b5afc3d9073e3430c8cd22b655b532235f7f73570770926
|
| 3 |
+
size 262419
|
backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/python_env.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
python: 3.13.9
|
| 2 |
+
build_dependencies:
|
| 3 |
+
- pip==25.3
|
| 4 |
+
- setuptools==80.9.0
|
| 5 |
+
- wheel==0.45.1
|
| 6 |
+
dependencies:
|
| 7 |
+
- -r requirements.txt
|
backend/mlartifacts/3/models/m-7928ac27e9b64c108f8770eaedd564c6/artifacts/requirements.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mlflow==3.15.0
|
| 2 |
+
bottleneck==1.4.2
|
| 3 |
+
dask==2025.11.0
|
| 4 |
+
lz4==4.4.5
|
| 5 |
+
numpy==2.3.5
|
| 6 |
+
numpydoc==1.9.0
|
| 7 |
+
pandas==2.3.3
|
| 8 |
+
psutil==7.0.0
|
| 9 |
+
pyarrow==21.0.0
|
| 10 |
+
pytest==8.4.2
|
| 11 |
+
scikit-learn==1.7.2
|
| 12 |
+
scipy==1.16.3
|
| 13 |
+
skops==0.14.0
|
| 14 |
+
tblib==3.1.0
|
| 15 |
+
xarray==2025.10.1
|
backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/MLmodel
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
artifact_path: mlflow-artifacts:/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts
|
| 2 |
+
flavors:
|
| 3 |
+
python_function:
|
| 4 |
+
env:
|
| 5 |
+
conda: conda.yaml
|
| 6 |
+
virtualenv: python_env.yaml
|
| 7 |
+
loader_module: mlflow.sklearn
|
| 8 |
+
model_path: model.skops
|
| 9 |
+
predict_fn: predict
|
| 10 |
+
python_version: 3.13.9
|
| 11 |
+
sklearn:
|
| 12 |
+
code: null
|
| 13 |
+
pickled_model: model.skops
|
| 14 |
+
serialization_format: skops
|
| 15 |
+
sklearn_version: 1.7.2
|
| 16 |
+
skops_trusted_types:
|
| 17 |
+
- sklearn.metrics._dist_metrics.EuclideanDistance64
|
| 18 |
+
- sklearn.neighbors._kd_tree.KDTree
|
| 19 |
+
mlflow_version: 3.15.0
|
| 20 |
+
model_id: m-a5d3b897a0b2414694580b45d6215a28
|
| 21 |
+
model_size_bytes: 1298461
|
| 22 |
+
model_uuid: m-a5d3b897a0b2414694580b45d6215a28
|
| 23 |
+
prompts: null
|
| 24 |
+
run_id: acd12216989742c89c5f838b274d738f
|
| 25 |
+
utc_time_created: '2026-08-02 12:48:14.909711'
|
backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/conda.yaml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
channels:
|
| 2 |
+
- conda-forge
|
| 3 |
+
dependencies:
|
| 4 |
+
- python=3.13.9
|
| 5 |
+
- pip<=25.3
|
| 6 |
+
- pip:
|
| 7 |
+
- mlflow==3.15.0
|
| 8 |
+
- bottleneck==1.4.2
|
| 9 |
+
- dask==2025.11.0
|
| 10 |
+
- lz4==4.4.5
|
| 11 |
+
- numpy==2.3.5
|
| 12 |
+
- numpydoc==1.9.0
|
| 13 |
+
- pandas==2.3.3
|
| 14 |
+
- psutil==7.0.0
|
| 15 |
+
- pyarrow==21.0.0
|
| 16 |
+
- pytest==8.4.2
|
| 17 |
+
- scikit-learn==1.7.2
|
| 18 |
+
- scipy==1.16.3
|
| 19 |
+
- skops==0.14.0
|
| 20 |
+
- tblib==3.1.0
|
| 21 |
+
- xarray==2025.10.1
|
| 22 |
+
name: mlflow-env
|
backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/model.skops
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:828454d34f10c8dd5b6907896907e9572bd2cc59821235e42aa013ab3b656a27
|
| 3 |
+
size 1298461
|
backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/python_env.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
python: 3.13.9
|
| 2 |
+
build_dependencies:
|
| 3 |
+
- pip==25.3
|
| 4 |
+
- setuptools==80.9.0
|
| 5 |
+
- wheel==0.45.1
|
| 6 |
+
dependencies:
|
| 7 |
+
- -r requirements.txt
|
backend/mlartifacts/3/models/m-a5d3b897a0b2414694580b45d6215a28/artifacts/requirements.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mlflow==3.15.0
|
| 2 |
+
bottleneck==1.4.2
|
| 3 |
+
dask==2025.11.0
|
| 4 |
+
lz4==4.4.5
|
| 5 |
+
numpy==2.3.5
|
| 6 |
+
numpydoc==1.9.0
|
| 7 |
+
pandas==2.3.3
|
| 8 |
+
psutil==7.0.0
|
| 9 |
+
pyarrow==21.0.0
|
| 10 |
+
pytest==8.4.2
|
| 11 |
+
scikit-learn==1.7.2
|
| 12 |
+
scipy==1.16.3
|
| 13 |
+
skops==0.14.0
|
| 14 |
+
tblib==3.1.0
|
| 15 |
+
xarray==2025.10.1
|
backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/MLmodel
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
artifact_path: mlflow-artifacts:/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts
|
| 2 |
+
flavors:
|
| 3 |
+
python_function:
|
| 4 |
+
env:
|
| 5 |
+
conda: conda.yaml
|
| 6 |
+
virtualenv: python_env.yaml
|
| 7 |
+
loader_module: mlflow.sklearn
|
| 8 |
+
model_path: model.skops
|
| 9 |
+
predict_fn: predict
|
| 10 |
+
python_version: 3.13.9
|
| 11 |
+
sklearn:
|
| 12 |
+
code: null
|
| 13 |
+
pickled_model: model.skops
|
| 14 |
+
serialization_format: skops
|
| 15 |
+
sklearn_version: 1.7.2
|
| 16 |
+
skops_trusted_types:
|
| 17 |
+
- sklearn.metrics._dist_metrics.EuclideanDistance64
|
| 18 |
+
- sklearn.neighbors._kd_tree.KDTree
|
| 19 |
+
mlflow_version: 3.15.0
|
| 20 |
+
model_id: m-e3745032d0564cf398f9382de6391bb3
|
| 21 |
+
model_size_bytes: 71326422
|
| 22 |
+
model_uuid: m-e3745032d0564cf398f9382de6391bb3
|
| 23 |
+
prompts: null
|
| 24 |
+
run_id: ddbcf3faf3944dfaa1ccc3dce0f7c385
|
| 25 |
+
utc_time_created: '2026-08-02 12:47:56.329756'
|
backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/conda.yaml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
channels:
|
| 2 |
+
- conda-forge
|
| 3 |
+
dependencies:
|
| 4 |
+
- python=3.13.9
|
| 5 |
+
- pip<=25.3
|
| 6 |
+
- pip:
|
| 7 |
+
- mlflow==3.15.0
|
| 8 |
+
- bottleneck==1.4.2
|
| 9 |
+
- dask==2025.11.0
|
| 10 |
+
- lz4==4.4.5
|
| 11 |
+
- numpy==2.3.5
|
| 12 |
+
- numpydoc==1.9.0
|
| 13 |
+
- pandas==2.3.3
|
| 14 |
+
- psutil==7.0.0
|
| 15 |
+
- pyarrow==21.0.0
|
| 16 |
+
- pytest==8.4.2
|
| 17 |
+
- scikit-learn==1.7.2
|
| 18 |
+
- scipy==1.16.3
|
| 19 |
+
- skops==0.14.0
|
| 20 |
+
- tblib==3.1.0
|
| 21 |
+
- xarray==2025.10.1
|
| 22 |
+
name: mlflow-env
|
backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/model.skops
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d54fc4e9fdc75c586ce646b824eb9f114479c35a483cbe305c8990e5654cca3
|
| 3 |
+
size 71326422
|
backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/python_env.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
python: 3.13.9
|
| 2 |
+
build_dependencies:
|
| 3 |
+
- pip==25.3
|
| 4 |
+
- setuptools==80.9.0
|
| 5 |
+
- wheel==0.45.1
|
| 6 |
+
dependencies:
|
| 7 |
+
- -r requirements.txt
|
backend/mlartifacts/3/models/m-e3745032d0564cf398f9382de6391bb3/artifacts/requirements.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mlflow==3.15.0
|
| 2 |
+
bottleneck==1.4.2
|
| 3 |
+
dask==2025.11.0
|
| 4 |
+
lz4==4.4.5
|
| 5 |
+
numpy==2.3.5
|
| 6 |
+
numpydoc==1.9.0
|
| 7 |
+
pandas==2.3.3
|
| 8 |
+
psutil==7.0.0
|
| 9 |
+
pyarrow==21.0.0
|
| 10 |
+
pytest==8.4.2
|
| 11 |
+
scikit-learn==1.7.2
|
| 12 |
+
scipy==1.16.3
|
| 13 |
+
skops==0.14.0
|
| 14 |
+
tblib==3.1.0
|
| 15 |
+
xarray==2025.10.1
|
backend/model/Random_Forest_best_model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a25f651983797572cc954c6d461c49be444f9b0b153fd239219f59682ead8b39
|
| 3 |
+
size 33983929
|
backend/requirements.txt
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastapi==0.136.1
|
| 2 |
+
uvicorn==0.34.0
|
| 3 |
+
scikit-learn==1.7.2
|
| 4 |
+
joblib==1.5.2
|
| 5 |
+
numpy==2.2.6
|
| 6 |
+
pandas==2.3.3
|
frontend/local-requirements.txt
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ipykernel==7.1.0
|
| 2 |
+
numpy==2.2.6
|
| 3 |
+
pandas==2.3.3
|
| 4 |
+
imbalanced-learn==0.14.0
|
| 5 |
+
scikit-learn==1.7.2
|
| 6 |
+
seaborn==0.13.2
|
| 7 |
+
matplotlib==3.10.8
|
| 8 |
+
xgboost==3.1.2
|
| 9 |
+
mlflow==3.7.0
|
| 10 |
+
dagshub==0.6.3
|
| 11 |
+
fastapi==0.124.2
|
| 12 |
+
uvicorn[standard]
|
| 13 |
+
pydantic==2.12.5
|
| 14 |
+
joblib==1.5.2
|
| 15 |
+
streamlit==1.52.1
|
| 16 |
+
python-multipart==0.0.20
|
| 17 |
+
gunicorn==23.0.0
|