Spaces:
Build error
Build error
File size: 1,100 Bytes
37aa687 d233a21 37aa687 d233a21 63ada1b 37aa687 a5e4641 37aa687 d233a21 a5e4641 37aa687 d233a21 37aa687 d233a21 a5e4641 d233a21 a5e4641 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import streamlit as st
from modules.simulator import simulate_data
from modules.filters import apply_filters
from modules.visuals import display_dashboard, display_heatmap
from modules.ai_engine import AIEngine
st.set_page_config(page_title="Pole Monitoring Dashboard", layout="wide")
st.title("๐ก Pole Monitoring - Real-Time Simulation")
st.sidebar.header("๐ ๏ธ Simulation Controls")
num_poles = st.sidebar.slider("Number of Poles", min_value=5, max_value=50, value=10)
simulate_faults = st.sidebar.checkbox("Simulate Random Faults", value=True)
# Simulate pole data
df = simulate_data(num_poles, simulate_faults)
# AI predictions (optional)
ai_engine = AIEngine()
df = ai_engine.predict_health(df)
st.sidebar.header("๐ Filter Data")
alert_filter = st.sidebar.multiselect("Alert Level", ["Green", "Yellow", "Red"], default=["Green", "Yellow", "Red"])
filtered_df = apply_filters(df, alert_filter)
# Dashboard and Heatmap Display
display_dashboard(filtered_df)
display_heatmap(filtered_df)
st.subheader("๐ Pole Monitoring Table")
st.dataframe(filtered_df, use_container_width=True)
|