File size: 930 Bytes
d9e40cd
 
 
 
 
 
 
 
 
fded6e8
 
 
 
b7289c6
 
 
796a4bb
 
b7289c6
 
 
796a4bb
b7289c6
796a4bb
 
 
 
 
 
b7289c6
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import streamlit as st

def get_rag():
    if 'vectorstore' in st.session_state and 'chain' in st.session_state:
        vectorstore = st.session_state['vectorstore']
        chain = st.session_state['chain']
        
        return vectorstore, chain
    else:
        return None, None
    
def set_rag(vectorstore, chain):
    st.session_state['vectorstore'] = vectorstore
    st.session_state['chain'] = chain

def set_partie_prenante(partie_prenante):
    if "partie_prenante" not in st.session_state:
        st.session_state['partie_prenante'] = []
    st.session_state['partie_prenante'] = partie_prenante

def get_partie_prenante():
    if 'parties_prenante' in st.session_state:
        return st.session_state['partie_prenante']
    else:
        return None

def get_parties_prenantes():
    if 'parties_prenantes' in st.session_state:
        return st.session_state['parties_prenantes']
    else:
        return None