|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import streamlit as st
|
|
|
from config import MAJOR_TABS, DEFAULTS
|
|
|
from sections import (
|
|
|
section_instructions, section_initial_data, section_initial_checks,
|
|
|
section_acoustic_treatment, section_final_checks, section_faq,
|
|
|
nav_to, nav_buttons
|
|
|
)
|
|
|
from report import generate_docx
|
|
|
|
|
|
|
|
|
st.set_page_config("Building Acoustics Analysis Tool", "🏫",
|
|
|
layout="wide", initial_sidebar_state="expanded")
|
|
|
|
|
|
|
|
|
for k, v in DEFAULTS.items():
|
|
|
st.session_state.setdefault(k, v)
|
|
|
|
|
|
|
|
|
with st.sidebar:
|
|
|
st.header("Navigation")
|
|
|
for tab in MAJOR_TABS:
|
|
|
st.button(tab, on_click=nav_to, args=(tab,))
|
|
|
st.markdown("---")
|
|
|
st.write("Version: V4-2025")
|
|
|
if st.session_state.major_tab == "Final Compliance Checks":
|
|
|
st.download_button("📥 Word Report",
|
|
|
generate_docx(),
|
|
|
"Acoustics_Report.docx",
|
|
|
"application/vnd.openxmlformats-officedocument."
|
|
|
"wordprocessingml.document")
|
|
|
|
|
|
|
|
|
ROUTES = {
|
|
|
"Instructions": section_instructions,
|
|
|
"Initial Data Entry": section_initial_data,
|
|
|
"Initial Compliance Checks": section_initial_checks,
|
|
|
"Acoustic Treatment": section_acoustic_treatment,
|
|
|
"Final Compliance Checks": section_final_checks,
|
|
|
"FAQ / Help": section_faq,
|
|
|
}
|
|
|
ROUTES[st.session_state.major_tab]()
|
|
|
|
|
|
|
|
|
st.write("---")
|
|
|
st.write("Developed by Dr Abdul-Manan Sadick · Deakin University · 2025")
|
|
|
|