ElvisWang111 commited on
Commit
06cc651
·
verified ·
1 Parent(s): 1a5c47e

Update workflow/preference/pref_render.py

Browse files
Files changed (1) hide show
  1. workflow/preference/pref_render.py +6 -3
workflow/preference/pref_render.py CHANGED
@@ -10,10 +10,13 @@ def preferences_select():
10
  key="modeling_requirements"
11
  )
12
 
 
13
  st.session_state.additional_preference = modeling_requirements
14
- if st.session_state.additional_preference is not None:
15
- st.chat_message("assistant").write(st.session_state.additional_preference)
16
-
 
 
17
  col1, col2, col3 = st.columns(3)
18
 
19
  with col1:
 
10
  key="modeling_requirements"
11
  )
12
 
13
+ # 存入 session_state
14
  st.session_state.additional_preference = modeling_requirements
15
+
16
+ # 如果用户有输入(非空)
17
+ if modeling_requirements.strip():
18
+ st.chat_message("assistant").write(f"用户的需求是:{modeling_requirements}")
19
+
20
  col1, col2, col3 = st.columns(3)
21
 
22
  with col1: