Skip to content

Commit f2acf18

Browse files
committed
update init hava_session_state_flag judge
1 parent b0fd562 commit f2acf18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

application/pages/1_🌍_Generative_BI_Playground.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ def main():
223223
all_profiles = ProfileManagement.get_all_profiles_with_info()
224224
# all_profiles.update(demo_profile)
225225
st.session_state['profiles'] = all_profiles
226+
else:
227+
all_profiles = ProfileManagement.get_all_profiles_with_info()
228+
st.session_state['profiles'] = all_profiles
226229

227230
if 'selected_sample' not in st.session_state:
228231
st.session_state['selected_sample'] = ''
@@ -249,7 +252,8 @@ def main():
249252
'anthropic.claude-3-haiku-20240307-v1:0', 'mistral.mixtral-8x7b-instruct-v0:1',
250253
'meta.llama3-70b-instruct-v1:0']
251254

252-
session_state_list = list(st.session_state.get('profiles', {}).keys())
255+
all_profiles = ProfileManagement.get_all_profiles_with_info()
256+
session_state_list = list(all_profiles.get('profiles', {}).keys())
253257

254258
hava_session_state_flag = False
255259
if len(session_state_list) > 0:

0 commit comments

Comments
 (0)