Spaces:
Sleeping
Sleeping
[email protected]
commited on
Commit
·
ea96b1d
1
Parent(s):
a85abe7
feat: add session state management for removing undefined values in prompt system
Browse files- app.py +1 -0
- pages/prompt_system.py +1 -1
app.py
CHANGED
@@ -24,6 +24,7 @@ def init_app():
|
|
24 |
|
25 |
st.session_state["retrived_documents"] = []
|
26 |
st.session_state["messages"] = []
|
|
|
27 |
st.session_state["assistant"] = Rag(vectore_store=vs_manager)
|
28 |
st.session_state["data_dict"] = config['variables']
|
29 |
st.session_state["prompt_system"] = config['prompt_system']
|
|
|
24 |
|
25 |
st.session_state["retrived_documents"] = []
|
26 |
st.session_state["messages"] = []
|
27 |
+
st.session_state["remove_undefined_value"] = True
|
28 |
st.session_state["assistant"] = Rag(vectore_store=vs_manager)
|
29 |
st.session_state["data_dict"] = config['variables']
|
30 |
st.session_state["prompt_system"] = config['prompt_system']
|
pages/prompt_system.py
CHANGED
@@ -4,7 +4,7 @@ def page():
|
|
4 |
|
5 |
st.subheader("Renseignez votre prompt système")
|
6 |
|
7 |
-
st.session_state["remove_undefined_value"] = st.checkbox("En cochant cette case, les lignes avec des paramètres vides seront supprimées.", value=
|
8 |
|
9 |
prompt = st.text_area("Prompt system", st.session_state.prompt_system if 'prompt_system' in st.session_state else "", height=400, max_chars=None)
|
10 |
|
|
|
4 |
|
5 |
st.subheader("Renseignez votre prompt système")
|
6 |
|
7 |
+
st.session_state["remove_undefined_value"] = st.checkbox("En cochant cette case, les lignes avec des paramètres vides seront supprimées.", value=st.session_state["remove_undefined_value"])
|
8 |
|
9 |
prompt = st.text_area("Prompt system", st.session_state.prompt_system if 'prompt_system' in st.session_state else "", height=400, max_chars=None)
|
10 |
|