Spaces:
Sleeping
Sleeping
File size: 1,255 Bytes
32841d3 3c9495b |
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 32 33 34 35 |
import streamlit as st
import pandas as pd
from modules.simulator import simulate_data
from modules.filters import apply_filters
from modules.visuals import display_dashboard, display_charts, display_map_with_alerts
from modules.ai_engine import AIEngine
st.set_page_config(page_title="Vedavathi Smart Pole Monitoring", layout="wide")
st.title("π‘ Vedavathi Smart Pole Monitoring - Heatmap AI Simulator")
# Sidebar Controls
st.sidebar.header("π οΈ Simulation Controls")
num_poles = st.sidebar.slider("Number of Poles", min_value=10, max_value=500, value=50)
simulate_faults = st.sidebar.checkbox("Simulate Random Faults", value=True)
# Simulate Data
df = simulate_data(num_poles, simulate_faults)
# AI-based Health Prediction
ai = AIEngine()
df = ai.predict_health(df)
# Sidebar Filters
st.sidebar.header("π Filter Data")
alert_filter = st.sidebar.multiselect("Alert Level", ["Green", "Yellow", "Red"], default=["Green", "Yellow", "Red"])
cam_filter = st.sidebar.selectbox("Camera Status", ["All", "Online", "Offline"], index=0)
df = apply_filters(df, alert_filter, cam_filter)
# Dashboard UI
display_dashboard(df)
st.subheader("π Live Pole Map")
display_map_with_alerts(df)
st.subheader("π Energy + Sensor Charts")
display_charts(df)
|