mojakob commited on
Commit
834500a
·
verified ·
1 Parent(s): 55bc85a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -1131,11 +1131,15 @@ with gr.Blocks(css=css) as app:
1131
  "Profile submitted successfully. Proceeding to the chatbot." # Feedback message
1132
  )
1133
 
 
 
 
 
 
 
 
1134
  user_profile_button.click(
1135
- fn=lambda age, profession, interest, app_state: (
1136
- store_user_profile(age, profession, interest, app_state),
1137
- show_chatbot_after_profile(age, profession, interest, app_state),
1138
- ),
1139
  inputs=[age_input, profession_input, interest_input, gr.State(app_state)],
1140
  outputs=[page_3b, page_3, user_profile_output]
1141
  )
 
1131
  "Profile submitted successfully. Proceeding to the chatbot." # Feedback message
1132
  )
1133
 
1134
+ def process_user_profile(age, profession, interest, app_state):
1135
+ """
1136
+ Process the user profile by storing it and transitioning to the chatbot.
1137
+ """
1138
+ store_user_profile(age, profession, interest, app_state)
1139
+ return show_chatbot_after_profile(age, profession, interest, app_state)
1140
+
1141
  user_profile_button.click(
1142
+ fn=process_user_profile,
 
 
 
1143
  inputs=[age_input, profession_input, interest_input, gr.State(app_state)],
1144
  outputs=[page_3b, page_3, user_profile_output]
1145
  )