Erva Ulusoy commited on
Commit
210eeb2
·
1 Parent(s): 0ee926e

make random choice of example proteins constant for each session

Browse files
Files changed (1) hide show
  1. ProtHGT_app.py +2 -1
ProtHGT_app.py CHANGED
@@ -38,6 +38,8 @@ if 'submitted' not in st.session_state:
38
  st.session_state.submitted = False
39
  if 'previous_inputs' not in st.session_state:
40
  st.session_state.previous_inputs = None
 
 
41
 
42
  with st.expander("🚀 Upcoming Features"):
43
  st.info("""
@@ -91,7 +93,6 @@ with st.sidebar:
91
  )
92
 
93
  if selection_method == "Use example query":
94
- st.session_state.example_proteins = random.sample(available_proteins, 5)
95
  selected_proteins = st.session_state.example_proteins
96
 
97
  elif selection_method == "Search proteins":
 
38
  st.session_state.submitted = False
39
  if 'previous_inputs' not in st.session_state:
40
  st.session_state.previous_inputs = None
41
+ if 'example_proteins' not in st.session_state:
42
+ st.session_state.example_proteins = random.sample(available_proteins, 5)
43
 
44
  with st.expander("🚀 Upcoming Features"):
45
  st.info("""
 
93
  )
94
 
95
  if selection_method == "Use example query":
 
96
  selected_proteins = st.session_state.example_proteins
97
 
98
  elif selection_method == "Search proteins":