jonathanjordan21 commited on
Commit
db2cb32
·
1 Parent(s): 89a2d08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -7,6 +7,9 @@ import numpy as np
7
  # if 'model' is not in st.session_state:
8
  # st.session_state['model'] = INSTRUCTOR('hkunlp/instructor-large')
9
 
 
 
 
10
  @st.cache_resource
11
  def load_model():
12
  return INSTRUCTOR('hkunlp/instructor-large')
@@ -64,12 +67,16 @@ else :
64
  if len(cols) < 2 :
65
  st.write("FAILED! At least 2 columns needed. Please check your dataset")
66
  else :
67
- with st.form("my_form"):
68
- desc = st.radio("Description Column", cols)
69
- message = st.radio("Template Column", cols)
70
- submitted = st.form_submit_button("submit")
71
- if submitted:
72
- process_data(df, desc, message, embed=True)
 
 
 
 
73
 
74
 
75
 
 
7
  # if 'model' is not in st.session_state:
8
  # st.session_state['model'] = INSTRUCTOR('hkunlp/instructor-large')
9
 
10
+ if 'query_bool' is not in st.session_state:
11
+ st.session_state['query_bool'] = False
12
+
13
  @st.cache_resource
14
  def load_model():
15
  return INSTRUCTOR('hkunlp/instructor-large')
 
67
  if len(cols) < 2 :
68
  st.write("FAILED! At least 2 columns needed. Please check your dataset")
69
  else :
70
+
71
+ st.sesion_state.query_bool = True
72
+
73
+ if st.sesion_state.query_bool:
74
+ with st.form("my_form"):
75
+ desc = st.radio("Description Column", cols)
76
+ message = st.radio("Template Column", cols)
77
+ submitted = st.form_submit_button("submit")
78
+ if submitted:
79
+ process_data(df, desc, message, embed=True)
80
 
81
 
82