Entz commited on
Commit
5c20f38
·
verified ·
1 Parent(s): 78b30d7

Upload index.py

Browse files
Files changed (1) hide show
  1. index.py +4 -5
index.py CHANGED
@@ -31,7 +31,6 @@ def start_registration():
31
  response.raise_for_status()
32
  data = response.json()
33
  print("API Response:", data)
34
- # Reset session state for new registration
35
  st.session_state.session_id = data["session_id"]
36
  st.session_state.current_question = data["message"]
37
  st.session_state.feedback = ""
@@ -118,13 +117,13 @@ def main():
118
 
119
  # Tab 1: Introduction
120
  with tab1:
121
- # st.subheader("About This Application")
122
  intro_content = read_content_from_file("tab1.txt")
123
  st.markdown(intro_content)
124
 
125
  # Tab 2: Registration Application
126
  with tab2:
127
- st.subheader("Registration")
128
  registration_content = read_content_from_file("tab2.txt")
129
  st.markdown(registration_content)
130
  st.markdown("**Developed by [email protected]**")
@@ -139,10 +138,10 @@ def main():
139
  edit_field(key, new_value)
140
  col1, col2 = st.columns(2)
141
  with col1:
142
- if st.button("Next Registration", key="next_reg", on_click=lambda: (start_registration(), st.rerun())):
143
  pass
144
  with col2:
145
- if st.button("End Session", key="end_sess", on_click=lambda: (start_registration(), st.rerun())):
146
  pass
147
  else:
148
  if st.session_state.get("current_question"):
 
31
  response.raise_for_status()
32
  data = response.json()
33
  print("API Response:", data)
 
34
  st.session_state.session_id = data["session_id"]
35
  st.session_state.current_question = data["message"]
36
  st.session_state.feedback = ""
 
117
 
118
  # Tab 1: Introduction
119
  with tab1:
120
+ st.subheader("About This Application")
121
  intro_content = read_content_from_file("tab1.txt")
122
  st.markdown(intro_content)
123
 
124
  # Tab 2: Registration Application
125
  with tab2:
126
+ # st.subheader("Registration")
127
  registration_content = read_content_from_file("tab2.txt")
128
  st.markdown(registration_content)
129
  st.markdown("**Developed by [email protected]**")
 
138
  edit_field(key, new_value)
139
  col1, col2 = st.columns(2)
140
  with col1:
141
+ if st.button("Next Registration", key="next_reg", on_click=start_registration):
142
  pass
143
  with col2:
144
+ if st.button("End Session", key="end_sess", on_click=start_registration):
145
  pass
146
  else:
147
  if st.session_state.get("current_question"):