IanYeo commited on
Commit
22f3460
·
1 Parent(s): b96b0f6

error correction

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -15,6 +15,7 @@ import streamlit as st
15
 
16
  chars = string.digits + string.ascii_uppercase + string.ascii_lowercase + '_$'
17
  selected_sheet = None
 
18
 
19
  def compress(g):
20
  bs = [int(g[i:i + 2], 16) for i in range(0, len(g), 2)]
@@ -131,14 +132,14 @@ if cobie_file_button:
131
  cobie_file = pd.ExcelFile(cobie_file_path)
132
  tabs = cobie_file.sheet_names
133
 
 
 
 
134
  selected_sheet = st.selectbox(
135
  'Select sheet for changing revit ids to COBie ids',
136
  tabs,
137
  )
138
 
139
-
140
- if selected_sheet:
141
-
142
  df = cobie_file.parse(selected_sheet)
143
 
144
  st.write(df)
 
15
 
16
  chars = string.digits + string.ascii_uppercase + string.ascii_lowercase + '_$'
17
  selected_sheet = None
18
+ tabs = None
19
 
20
  def compress(g):
21
  bs = [int(g[i:i + 2], 16) for i in range(0, len(g), 2)]
 
132
  cobie_file = pd.ExcelFile(cobie_file_path)
133
  tabs = cobie_file.sheet_names
134
 
135
+
136
+
137
+ if tabs:
138
  selected_sheet = st.selectbox(
139
  'Select sheet for changing revit ids to COBie ids',
140
  tabs,
141
  )
142
 
 
 
 
143
  df = cobie_file.parse(selected_sheet)
144
 
145
  st.write(df)