""" UI Components for Traffic Accident Reconstruction System ======================================================== Reusable Streamlit components for the application. """ import streamlit as st from config import CASE_STUDY_LOCATION, ALTERNATIVE_LOCATIONS def render_sidebar(): """Render the application sidebar.""" with st.sidebar: # MindSpore Logo at the top try: st.image("assets/mindspore_logo.png", width=120) except: st.markdown("### π€ MindSpore") st.markdown("---") st.header("π Accident Analyzer") st.markdown(""" This system helps traffic authorities understand accidents through: - **AI-powered** scenario generation - **Real map** visualization - **2D simulation** of accidents - **Probability analysis** of scenarios """) st.markdown("---") st.subheader("π Case Study Location") st.info(f""" **{CASE_STUDY_LOCATION['name']}** π {CASE_STUDY_LOCATION['city']}, {CASE_STUDY_LOCATION['country']} πΊοΈ Lat: {CASE_STUDY_LOCATION['latitude']:.4f} πΊοΈ Lng: {CASE_STUDY_LOCATION['longitude']:.4f} """) st.markdown("---") st.subheader("π Help") with st.expander("How to use"): st.markdown(""" 1. **Select Location**: View the roundabout location 2. **Vehicle 1**: Enter first vehicle details and draw its path 3. **Vehicle 2**: Enter second vehicle details and draw its path 4. **Analyze**: Let AI generate possible scenarios 5. **Results**: View scenarios with probability scores """) with st.expander("About MindSpore"): st.markdown(""" This system uses **Huawei MindSpore** for AI-powered scenario generation. MindSpore is an open-source deep learning framework optimized for Ascend processors. """) st.markdown("---") st.caption("Huawei AI Innovation Challenge 2026") def render_header(): """Render the application header.""" st.markdown("""
AI-Powered Analysis using Huawei MindSpore
{content}
{label}