import streamlit as st import joblib import pandas as pd @st.cache_resource(ttl=6*300) # Reruns every 6 hours def run_model(): # Load or train your model (pretrained model in this case) model = joblib.load("linear_regression_model.pkl") # Static input values input_data = pd.DataFrame({ 'Temperature': [20.0], 'Wind Speed': [10.0], 'Humidity': [50.0] }) # Run the model with static input prediction = model.predict(input_data) return prediction # Custom function to create styled metric boxes with subscripts, smaller label, and larger metric def custom_metric_box(label, value, delta): st.markdown(f"""

{label}

{value}

{delta}

""", unsafe_allow_html=True) # Custom function to create pollution metric boxes with side-by-side layout for label and value # Custom function to create pollution metric boxes with side-by-side layout and fixed width def pollution_box(label, value, delta): st.markdown(f"""

{label}

{value}

{delta}

""", unsafe_allow_html=True)