Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
"""
|
2 |
-
|
3 |
|
4 |
-
This is the main module for the
|
5 |
orchestrator for the application, handling navigation between different modules and managing
|
6 |
the overall application flow.
|
7 |
|
@@ -36,20 +36,20 @@ from app.renewable_energy import display_renewable_energy_page
|
|
36 |
from app.embodied_energy import display_embodied_energy_page
|
37 |
from app.materials_cost import display_materials_cost_page
|
38 |
|
39 |
-
class
|
40 |
"""
|
41 |
-
Main class for the
|
42 |
Handles navigation, session state initialization, and module integration.
|
43 |
"""
|
44 |
|
45 |
def __init__(self):
|
46 |
"""
|
47 |
-
Initialize the
|
48 |
Sets up the page configuration and initializes session state if needed.
|
49 |
"""
|
50 |
# Configure the Streamlit page
|
51 |
st.set_page_config(
|
52 |
-
page_title="
|
53 |
page_icon="🌡️",
|
54 |
layout="wide",
|
55 |
initial_sidebar_state="expanded"
|
@@ -170,7 +170,7 @@ class HVACApp:
|
|
170 |
Set up the main application layout with sidebar navigation and main content area.
|
171 |
"""
|
172 |
# Create the sidebar
|
173 |
-
st.sidebar.title("
|
174 |
st.sidebar.markdown("---")
|
175 |
|
176 |
# Navigation section in sidebar
|
@@ -210,7 +210,7 @@ class HVACApp:
|
|
210 |
# Add application info to sidebar
|
211 |
st.sidebar.markdown("---")
|
212 |
st.sidebar.info(
|
213 |
-
"
|
214 |
"Based on ASHRAE CTF/TFM methods\n\n"
|
215 |
"Developed by: Dr Majed Abuseif\n\n"
|
216 |
"School of Architecture and Built Environment\n\n"
|
@@ -288,7 +288,7 @@ class HVACApp:
|
|
288 |
st.info("This is a placeholder for the Intro module. The actual module will be implemented in Stage 2.")
|
289 |
st.markdown("""
|
290 |
### About
|
291 |
-
The
|
292 |
|
293 |
### Features
|
294 |
- Building information input
|
@@ -536,7 +536,7 @@ class HVACApp:
|
|
536 |
# Main entry point
|
537 |
if __name__ == "__main__":
|
538 |
try:
|
539 |
-
app =
|
540 |
except Exception as e:
|
541 |
st.error(f"An error occurred: {str(e)}")
|
542 |
logger.exception("Application error")
|
|
|
1 |
"""
|
2 |
+
BuildSustain - Main Module
|
3 |
|
4 |
+
This is the main module for the BuildSustain application. It serves as the central
|
5 |
orchestrator for the application, handling navigation between different modules and managing
|
6 |
the overall application flow.
|
7 |
|
|
|
36 |
from app.embodied_energy import display_embodied_energy_page
|
37 |
from app.materials_cost import display_materials_cost_page
|
38 |
|
39 |
+
class BuildSustain:
|
40 |
"""
|
41 |
+
Main class for the BuildSustain application.
|
42 |
Handles navigation, session state initialization, and module integration.
|
43 |
"""
|
44 |
|
45 |
def __init__(self):
|
46 |
"""
|
47 |
+
Initialize the BuildSustain application.
|
48 |
Sets up the page configuration and initializes session state if needed.
|
49 |
"""
|
50 |
# Configure the Streamlit page
|
51 |
st.set_page_config(
|
52 |
+
page_title="BuildSustain",
|
53 |
page_icon="🌡️",
|
54 |
layout="wide",
|
55 |
initial_sidebar_state="expanded"
|
|
|
170 |
Set up the main application layout with sidebar navigation and main content area.
|
171 |
"""
|
172 |
# Create the sidebar
|
173 |
+
st.sidebar.title("BuildSustain")
|
174 |
st.sidebar.markdown("---")
|
175 |
|
176 |
# Navigation section in sidebar
|
|
|
210 |
# Add application info to sidebar
|
211 |
st.sidebar.markdown("---")
|
212 |
st.sidebar.info(
|
213 |
+
"BuildSustain v3.0.0\n\n"
|
214 |
"Based on ASHRAE CTF/TFM methods\n\n"
|
215 |
"Developed by: Dr Majed Abuseif\n\n"
|
216 |
"School of Architecture and Built Environment\n\n"
|
|
|
288 |
st.info("This is a placeholder for the Intro module. The actual module will be implemented in Stage 2.")
|
289 |
st.markdown("""
|
290 |
### About
|
291 |
+
The BuildSustain is a tool for calculating heating and cooling loads for buildings.
|
292 |
|
293 |
### Features
|
294 |
- Building information input
|
|
|
536 |
# Main entry point
|
537 |
if __name__ == "__main__":
|
538 |
try:
|
539 |
+
app = BuildSustain()
|
540 |
except Exception as e:
|
541 |
st.error(f"An error occurred: {str(e)}")
|
542 |
logger.exception("Application error")
|