|
import sys |
|
import os |
|
|
|
import streamlit as st |
|
from organisations_engagees import display_organisations_engagees |
|
from localisation import display_map |
|
from statistiques import main as display_statistics |
|
from ActionsRSE import display_actions_rse |
|
from AnalyseActionsRSE import display_analyse_actions_rse |
|
from partiesprenantes import display_materiality_partiesprenantes |
|
from partie_prenante_carte import display_pp |
|
|
|
|
|
|
|
from projetRSE import display_rse_projects |
|
from labelRSE import display_rse_labels |
|
from entreprises_labellisees import display_labelled_companies |
|
from inspirezvous import * |
|
from collaborons import display_company_selection_for_materiality,display_materiality_matrix |
|
from documentations import display_documentation |
|
from RAG_PDF_WEB import rag_pdf_web |
|
from prompt import get_prompts_list,prompt_execution,execute_prompt |
|
from chat_with_pps import display_chat |
|
from high_chart import test_chart |
|
from chat_te import display_chat_te |
|
|
|
def main(): |
|
st.markdown(":point_left: Cliquez pour vous inspirer", unsafe_allow_html=True) |
|
|
|
st.sidebar.title("OPEN DATA & IA au service de la RSE") |
|
section_principale = st.sidebar.radio( |
|
"Choisissez votre section", |
|
["Data Bordeaux métropole", "Data bziiit","IA RSE","Documentation"], |
|
index=2 |
|
) |
|
|
|
if section_principale == "Data Bordeaux métropole": |
|
app_mode = st.sidebar.radio( |
|
"Choisissez votre sous-section", |
|
["Localisations", "Organisations engagées", "Statistiques", "Actions RSE", "Analyse actions RSE"] |
|
) |
|
if app_mode == "Localisations": |
|
display_map() |
|
elif app_mode == "Organisations engagées": |
|
display_organisations_engagees() |
|
elif app_mode == "Statistiques": |
|
display_statistics() |
|
elif app_mode == "Actions RSE": |
|
display_actions_rse() |
|
elif app_mode == "Analyse actions RSE": |
|
display_analyse_actions_rse() |
|
|
|
|
|
elif section_principale == "Data bziiit": |
|
ia_mode = st.sidebar.radio( |
|
"Choisissez votre sous-section", |
|
["Labels RSE", "Entreprises labellisées", "Fiches entreprises"] |
|
) |
|
if ia_mode == "Labels RSE": |
|
display_rse_labels() |
|
elif ia_mode == "Entreprises labellisées": |
|
display_labelled_companies() |
|
elif ia_mode == "Fiches entreprises": |
|
data, bziiit_data = fetch_data() |
|
selected_company = display_company_selection(data) |
|
display_company_info(data, bziiit_data, selected_company) |
|
|
|
elif section_principale == "IA RSE": |
|
ia_mode = st.sidebar.radio( |
|
"Choisissez votre sous-section", |
|
[ |
|
"Audit flash RSE de vos contenus", |
|
"Parties prenantes", |
|
"Chatbot Parties Prenantes", |
|
"Prompts RSE - TE", |
|
"Chatbot RSE - TE", |
|
] |
|
) |
|
|
|
if ia_mode == "Parties prenantes": |
|
|
|
|
|
|
|
|
|
display_pp() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif ia_mode == "Chatbot Parties Prenantes": |
|
display_chat() |
|
|
|
elif ia_mode == "Audit flash RSE de vos contenus": |
|
rag_pdf_web() |
|
|
|
elif ia_mode == "Prompts RSE - TE": |
|
get_prompts_list() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif ia_mode == "Chatbot RSE - TE": |
|
display_chat_te() |
|
|
|
elif section_principale == "Documentation": |
|
display_documentation() |
|
|
|
|
|
st.sidebar.markdown("---") |
|
st.sidebar.markdown("Powered by **bziiit IA RSE**") |
|
st.sidebar.markdown("2024 : Open source en Licence MIT") |
|
st.sidebar.markdown("[email protected]") |
|
st.sidebar.markdown("---") |
|
|
|
if __name__ == "__main__": |
|
main() |