mabuseif commited on
Commit
97aa170
·
verified ·
1 Parent(s): a5349a8

Upload 31 files

Browse files
Files changed (1) hide show
  1. app/building_info_form.py +27 -1
app/building_info_form.py CHANGED
@@ -26,6 +26,32 @@ class BuildingInfoForm:
26
  Display the building information form.
27
  This method is called from main.py.
28
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  self.display_building_info_form(st.session_state)
30
 
31
  @staticmethod
@@ -65,7 +91,7 @@ class BuildingInfoForm:
65
  }
66
 
67
  # Create form
68
- with st.form("building_info_form"):
69
  st.subheader("Project Information")
70
 
71
  col1, col2 = st.columns(2)
 
26
  Display the building information form.
27
  This method is called from main.py.
28
  """
29
+ # Initialize building info in session state if not exists
30
+ if "building_info" not in st.session_state:
31
+ st.session_state["building_info"] = {
32
+ "project_name": "",
33
+ "building_name": "",
34
+ "location": "",
35
+ "climate_zone": "",
36
+ "building_type": "",
37
+ "floor_area": 0.0,
38
+ "num_floors": 1,
39
+ "floor_height": 3.0,
40
+ "orientation": "NORTH",
41
+ "occupancy": 0,
42
+ "operating_hours": "8:00-18:00",
43
+ "design_conditions": {
44
+ "summer_outdoor_db": 35.0,
45
+ "summer_outdoor_wb": 25.0,
46
+ "summer_indoor_db": 24.0,
47
+ "summer_indoor_rh": 50.0,
48
+ "winter_outdoor_db": -5.0,
49
+ "winter_outdoor_rh": 80.0,
50
+ "winter_indoor_db": 21.0,
51
+ "winter_indoor_rh": 40.0
52
+ }
53
+ }
54
+
55
  self.display_building_info_form(st.session_state)
56
 
57
  @staticmethod
 
91
  }
92
 
93
  # Create form
94
+ with st.form(key="building_info_form"):
95
  st.subheader("Project Information")
96
 
97
  col1, col2 = st.columns(2)